Skip to content
cybertoast edited this page Mar 15, 2011 · 11 revisions

License

Apache License, Version 2

Installation

  • Install exactly the same way you would any other Firefox Extension, just keep in mind that it requires Selenium IDE.
  • Restart Selenium IDE after installation for changes to become available.

Getting the Extension and building from source

  • Get the prebuilt XPIs here
  • To build from source remember that Firefox extensions are just zip files, so
    zip -r flex-pilot-x.xpi ./*
    from the extension/ folder should do the trick.

For your Flex application to be testable, the FlexPilot bindings must be setup in your application.
Steps are outlined – HERE

Usage

  • To record, click the red record button
  • To explore, click the button ‘flex explorer’

Example Test


from selenium import selenium
import unittest, time, re

class test_wait(unittest.TestCase):
    def setUp(self):
        self.verificationErrors = []
        self.selenium = selenium("localhost", 4444, "*firefoxproxy", "http://jeeoh.com/")
        self.selenium.start()

    def test_test_wait(self):
        sel = self.selenium
        sel.open("/flexpilot/")
        sel.wait_for_flex_ready("id=testApp", "5000")
        sel.flex_click("id=testApp", "chain=name:testTextArea")
        sel.flex_click("id=testApp", "chain=id:howdyButton")
        sel.flex_type("id=testApp", "text=asdasd,chain=name:testTextInput")
        sel.flex_click("id=testApp", "chain=id:subPanel/name:comboTest")
        sel.flex_select("id=testApp", "label=Geddy,chain=id:subPanel/name:comboTest")
        sel.flex_click("id=testApp", "chain=name:testTextArea")
        sel.flex_type("id=testApp", "text=asdasd,chain=name:testTextArea")
        sel.flex_click("id=testApp", "chain=id:howdyButton")

    def tearDown(self):
        self.selenium.stop()
        self.assertEqual([], self.verificationErrors)

if __name__ == "__main__":
    unittest.main()

Selenium RC

If you would like to run your newly recorded flex test with Selenium RC, you can get the user extension JS file: HERE

And follow the Selenium user extensions directions: HERE


[email protected].