Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flash automation using Selenium RC

I'm struggling a lot to automate Flash using Selenium RC.

Can any one please give me a sample Flash application code (methods) and the Selenium RC code to automate the same.

like image 589
TestUser Avatar asked Sep 07 '10 04:09

TestUser


4 Answers

You might also want to take a look at FlashSelenium. They have a working example documented. That worked for me.

like image 159
datka Avatar answered Oct 15 '22 16:10

datka


Selenium can not automate applications that work within their own blackbox in the browser. This means that Selenium can not test Silverlight and Flash.

There is Flexmonkium which is a Selenium FlexMonkey bridge that you could use. There are details about it here

like image 37
AutomatedTester Avatar answered Oct 15 '22 16:10

AutomatedTester


Genie is also another tool you may be able to utilize to automate flash. You can import the selenium jar into Genie to attempt to take advantage of bot

http://sourceforge.net/adobe/genie/wiki/Home/

Automated UI Tester for Adobe® ActionScript® is a pure ActionScript 3.0 SWF automation testing tool with the capability of recording user actions on an SWF file and playing them back with high fidelity. The API for this tool is provided with name “Genie.”

Some major features of this tool are:

  • No instrumentation or application manipulation is required
  • Automate pure ActionScript 3.0 SWF
  • No source code access required
  • No need to run inside any wrapper
  • Works on web based apps and standalone SWF
  • Performs native automation (no image dependency) thus making scripts reliable and lowering down maintenance cost
  • Application can even be running in background
like image 3
Russell Bradley Avatar answered Oct 15 '22 16:10

Russell Bradley


I've recently been using Sikuli Script to automate tedious Flash tasks. It would be really easy to use it to create repeatable UI tests.

Sikuli Script is built in Java with a Jython layer on top. All of the scripting is done in Python.

It works by "looking" at the screen, finding GUI elements, such as buttons, and then interacting with them.

For instance, look at the Windows 'Hello World' script.

Line 1 tells Sikuli, "find a button that looks like this, and click it."

Line 2 instructs it to type "hello world."

Because the scripting language used is Python, your logic can be as simple or complex as you'd like.

What really appeals to me is that the logic of my code can follow almost the exact pattern I would if I were actually using the UI manually. For instance, my logic might say "find the 'First Name' field, click it, and type my name into it."

The MIT license is also nice. You don't have to worry about how you're using it or if you're using it in a commercial context.

like image 2
Ben Avatar answered Oct 15 '22 15:10

Ben