Recently I was looking for tools to support automated testing for flex applications. I have a test suite in SeleniumRC and C# I was looking for options to continue using this environment. Here’s what I found:
These two projects provides capabilities to interact with Flex UI components and web pages through selenium RC.
Selenium Flex API automatically exposes Flex APP UI and FlashSelenium allowing us to call ActionScript methods to interact with Flex elements. Note that this approach requires us to compile our flex applications with Selenium Flex API library.
To start coding your test:
- Rebuild your Flex application with sfapi.swc add the compiler argument: -include-libraries "..\libs\sfapi.swc"
- Include FlashSelenium.dll library in the seleniumRC test project.
This a “hello world” example:
public class MyAppInFlexTest
private ISelenium selenium;
private FlashSelenium.FlashSelenium flashApp;
public void SetupTest()
selenium = new DefaultSelenium("localhost", 4444, @"*firefoxproxy", @"http://localhost/testapp.html");
flashApp = new FlashSelenium.FlashSelenium(selenium, "MyAppInFlex");
public void TeardownTest()
public void TestMethodFlashSelenium()
flashApp.Call("doFlexType", "usernameTextInput", "from selenium flex");
flashApp.Call("doFlexClick", "secureCheckBox", "");