Can I automate a Flash GUI with Ranorex?

Ask general questions here.
dodel
Posts: 2
Joined: Wed Apr 04, 2007 2:21 pm

Can I automate a Flash GUI with Ranorex?

Post by dodel » Wed Apr 04, 2007 2:33 pm

Hello,

I would like to know if it is possible to automate Flash GUi with ComboBox or others flash native components ?

Thank you,

Do

webops
Site Admin
Site Admin
Posts: 349
Joined: Wed Jul 05, 2006 7:44 pm

Post by webops » Thu Apr 05, 2007 8:20 pm

Hi Do,

In the following example a flash application running in the IE will be automated. A Radiobutton, Checkbox and Button will be clicked.

1. Open following url in the IE:
http://flash-creations.com/notes/swf/v2 ... _final.swf


2. Finding the browser in a C# Application

Code: Select all

Form form = Application.FindFormTitle("Internet Explorer",SearchMatchMode.MatchSubstring);
if ( form == null )
{
	Console .WriteLine("Cannot find application Internet Explorer"); 
	return 1;
}
form.Activate();
3. Finding the Flash app in the IE

Code: Select all

Element el = form.Element.FindChild(Role.Client, null, "MacromediaFlashPlayerActiveX");
4. Finding Elements(Radiobutton,...) and clicking them

Code: Select all

Element jumpButton = el.FindChild(Role.PushButton, "jump");
Mouse.ClickElement(jumpButton, MouseButtonType.LeftButton, new Point(10, jumpButton.Size.Height / 2), 1, 500);

Element makeSmallerButton = el.FindChild(Role.PushButton, "make smaller");
Mouse.ClickElement(makeSmallerButton, MouseButtonType.LeftButton, new Point(10, 10), 1, 500);

Element doItButton = el.FindChild(Role.PushButton, "Do It");
Mouse.ClickElement(doItButton);
I hope it helps you!
Maybe RanorexRecorder helps you...

Gabor
Ranorex Team

dodel
Posts: 2
Joined: Wed Apr 04, 2007 2:21 pm

Post by dodel » Wed Apr 11, 2007 9:25 am

Hello,

Thank you very much for your help, do you have any ideas to automate click on ComboBox in Flash, to make Ranorex consider them as push button ?

Do

webops
Site Admin
Site Admin
Posts: 349
Joined: Wed Jul 05, 2006 7:44 pm

Post by webops » Wed Apr 11, 2007 6:57 pm

Hi,

To click on elements of a ComboBox you have to drop it down first. After that the elements are "visible" and you can find them.

You have to navigate with the TAB key to the ComboBox and press CTRL + DOWN to drop it down. I'm sorry but i think this is the only way to drop down a flash ComboBox.

1. Open the same sample flash application as described above

2. Find the Flash app in the IE and navigate to the ComboBox

Code: Select all

Control flash = form.FindClassName("MacromediaFlashPlayerActiveX");
flash.Focus();
flash.SendKeys("{TAB}{TAB}{TAB}{TAB}{TAB}{TAB}^{DOWN}");
3. Find and click on a ComboBox element

Code: Select all

Application.Sleep(200);
Element johnButton = flash.Element.FindChild(Role.PushButton, "John");
Mouse.ClickElement(johnButton);
Hope it helps!

Gabor
Ranorex Team

Gendal67
Posts: 1
Joined: Tue Jul 01, 2008 2:03 pm

Post by Gendal67 » Tue Jul 01, 2008 2:10 pm

Hi everyone,

It's the first time, I heard about "Ranorex". I read on Wikipedia that's a Windows GUI to make software developpement easier.
I'm ready to install and test it if it can help me.

Could you say me if it's possible to register and handle Flash events ?
Is it possible to cast or "transform" the flash "Element" to an object of type 'ShockwaveFlash' (.NET object, provided by Adobe) ?
If I can get this object, I can then register to flash events...

I hope someone will respond and help me please :)

Cheers,
Jack, FRANCE

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Post by Support Team » Mon Jul 07, 2008 3:02 pm

Jack,

Unfortunately, this is not possible at the moment.

The upcoming Ranorex 2.0 will have support for flash/flex testing.

Michael
Ranorex Team