Click here to Skip to main content
13,557,910 members
Click here to Skip to main content
Add your own
alternative version

Tagged as


1 bookmarked
Posted 4 Oct 2010
Licenced CPOL

Selenium Testing with FlexPilot

, 4 Oct 2010
Rate this:
Please Sign up or sign in to vote.
Selenium testing with FlexPilot

I continued my quest for a solution to create automated tests using seleniumRC and C# and this time, I took a look at this new project called Flex Pilot.

FlexPilot is a open source testing tool that integrates with selenium, it has a bootstrapper to make the application testable, it is able to use a selenium IDE recorder, and you can access elements using chain syntax (like accessing with xpath).

Here is what I did to start building tests with flex pilot:

  • Rebuilded flexpilot: source is and executed this will update FlexPilot.swf and FPBootstrap.swf located under org/flex_pilot folder (place this file where the app is located)
  • Copied the content from src/org/flex_pilot folder to the flex's app libs folder example C:\source\MyAppInFlex\libs
  • Imported Bootstrap in the flex app
    import org.flex_pilot.FPBootstrap;
  • Set FPBootstrap.flex_pilotLibPath the path on the server where FPBootstrap can find FlexPilot.swf. The Loader fetches FlexPilot.swf via a Loader class.
    FPBootstrap.flex_pilotLibPath = '/flash/org/flex_pilot/FlexPilot.swf';
  • Initialize FPBootstrap - this fetches and loads FlexPilot.swf, and gives FlexPilot Flash a context to use for testing. This context is usually a reference to app’s Stage.
    <mx:Application xmlns:mx="" 
    layout="absolute" xmlns:local="*" creationComplete="init() 
                import mx.utils.ObjectUtil;    
                import org.flex_pilot.FPBootstrap;
                private function initFlexPilot():void
                    FPBootstrap.flex_pilotLibPath = 'FlexPilot.swf';
  • Compiled application: mxmlc -source-path=. -source-path+=../libs MyAppInFlex.mxml -o MyAppInFlex.swf
  • If present, remove tags like <noscript> around the flex object in your HTML.
  • If the configuration is working, Firebug will return “function” when calling document.getElementById('MyAppInFlex').fp_click
  • This is the “hello world” example of a test method on C#
    public void TestMethodFlexPilot()
                            text:'Flex Pilot'})");
FlexPilot has seleniumRC client drivers available for Java, Python and Ruby (no C# client driver available yet).


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Denmark Denmark
No Biography provided

You may also be interested in...


Comments and Discussions

GeneralSelenium is not recognizing flexstore application(I am running it in FILE:://.". Pin
nethrarayappa3-May-11 20:41
membernethrarayappa3-May-11 20:41 
GeneralRe: Selenium is not recognizing flexstore application(I am running it in FILE:://.". Pin
mariangemarcano4-May-11 18:53
membermariangemarcano4-May-11 18:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02-2016 | 2.8.180515.1 | Last Updated 4 Oct 2010
Article Copyright 2010 by mariangemarcano
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid