Skip to content
admc edited this page Sep 14, 2010 · 1 revision

If you are a developer and have done some work in the FlexPilot AS3 code, you will want to add any new user facing methods to the extension.

Within the project you will need to do a few things to do so:

  1. Add the method to: ./flex-pilot-x/extension/chrome/content/extensions/extension-flexpilot.js (trusted using wrappedJS)
  2. Add the method extending the Selenium.prototype (making it available to the Selenium core runner)
  3. If you want it available on Sauce OnDemand, also add your method to the RemoteSelenium.prototype inside the try block
  4. Add a corresponding XML entry to ./flex-pilot-x/extension/chrome/content/formats/flexpilot.xml
  5. (This makes it visible in the Selenium IDE UI)
  6. Add the method to the user-extensions.js in the root of the project to be used with Selenium RC (not trusted, no wrappedJS)
  7. Add your method to each of the client library languages you want your method to be available in ./flex-pilot-x/client/*

You should now see your new method in the Selenium IDE drop down and be able to run it.

Trusted explanation (wrappedJS)

The Selenium IDE is a Firefox extension, which means it operates in a trusted space, which also means when you access DOM objects in the content space you need to use the wrappedJSObject property to actually access the object.

This however is not the case in the RC as it is running in a space via the chrome URL that is trusted but doesn’t use wrapped JS objects, which is why there needs to be two copies of the file.

With some javascript I could check to see if wrappedJSObject exists, allowing us to have only one file — but we will see (I still haven’t made this decision yet).

Clone this wiki locally