Selenium testing Flex Appication, Please help

326 views
Skip to first unread message

hasan hanon

unread,
Apr 29, 2010, 5:23:10 PM4/29/10
to Selenium-Flex API - Support
Hello Every body

I hope I get a response as soon as possible.

I want to test a flex application using selenium. I was following this
article but its not working for me, I spent days on it and could not
get any solution (nothing is working)
here is what I did.
---------------------------------------------
Libraries:

selenium-server_1.0.3.jar
selenium-java-client-driver_1.0.1.jar
flashselenium-java-client-extension-1.0.jar
flex-ui-selenium-0.1.1.jar
flash-selenium.jar

I am using iexplore 7.



----------------------------------------------------
Setup method:

selenium = new DefaultSelenium("localhost", 4444,
"*iexplore",BASE_URL);
selenium.start();
selenium.open(PAGE );
flexUITester = new FlexUISelenium(selenium,
SWF_NAME);
flexUITester.waitUntilLoaded();

Test method:

Thread.sleep(1000);
assertEquals("Dispute Management",
selenium.getTitle());
flexUITester.type("username").at("txt1");
flexUITester.type("password1234").at("txt2");
flexUITester.click("goBtn");


------------------------------------------

I am still not sure where to build SeleniumFlexAPI.swc ? and where is
suppose to go in which directory.

I have it in library folder and in the WEB-INF\flex\libs\

but still not sure.

Can Any one help Please








Phil Hicks

unread,
Apr 29, 2010, 5:46:16 PM4/29/10
to sfapi-...@googlegroups.com
Hi Hasan,

You need to make sure that you compile the flex application using the SeleniumFlexAPI.swc. If you are using Adobe Flex Builder 3 then this is easily achieved by right clicking and opening your application's project properties and then selecting Build/Compiler arguments (I can't remember the exact names as I'm not at work at the moment) and then entering the parameters in the additional compile arguments. It's safest to include the whole path name to the SeleniumFlexAPI.swc, so put it somewhere easy to find like C:\SeleniumFlexAPI.swc.

There are pre-compiled example projects (e.g. the selben/fruit project) available if compiling your own project is a problem and I'd recommend doing this to ensure your setup is correct.

Also be sure to include a link to the user-extensions.js in your Selenium IDE, by going to Options -> Options and browsing to the file.

All of the above is covered in the documentation so hopefully you've just missed something out. :-)

It may also be useful to post any error messages here, and use a testing framework such as JUnit or TestNG.

Hope this helps.

sid

unread,
Jul 26, 2012, 9:02:48 AM7/26/12
to sfapi-...@googlegroups.com
Hi Phil,
I have recompiled the flex app using all the prescribed steps and have alse added user-extensions.js into the IDE but still on running the Webapp , the Selenium IDE is not able to recognise the Flex application events.

Can you please provide end-to-end soln of automating Flex Application using Selenium IDE (basically record and play)
.

Raghav Ramachandra

unread,
Sep 1, 2012, 12:50:05 PM9/1/12
to sfapi-...@googlegroups.com
Hi All,
This is Rag,

Even i'm trying to automate flex based web application in our company.

So can please anybody  help in automating this?

Regards,
Rag

malappa...@gmail.com

unread,
Apr 18, 2013, 12:02:15 AM4/18/13
to sfapi-...@googlegroups.com
Hai All,
               After adding SeleniumFlexAPI.swc file into Additional compile Arguments. where this library file can be include into flex project.


i am very hope full for giving response very quickly.

Thanks,
Malappa.

Kishor Kumar

unread,
Apr 18, 2013, 1:22:35 PM4/18/13
to sfapi-...@googlegroups.com
Hi Malappa,
Once your application is compiled by providing the necessary SWC file, your target build  SWF file includes your swc file also. not need to copy it .

you can just open application ,which is selenium automation ready.


Regards,
Kishor

malappa...@gmail.com

unread,
Apr 25, 2013, 2:45:17 AM4/25/13
to sfapi-...@googlegroups.com
Thanks kishor.

malappa...@gmail.com

unread,
Apr 25, 2013, 2:45:49 AM4/25/13
to sfapi-...@googlegroups.com


On Thursday, April 25, 2013 12:15:17 PM UTC+5:30, malappa...@gmail.com wrote:
Thanks kishor.
    Malappa.
Reply all
Reply to author
Forward
0 new messages