Selenium IDE is a tool that allows you to record and playback actions performed inside a web browser. It's available as a downloadable Firefox extension. Selenium IDE comes with an option to export recordings as various WebDriver test scripts, one of which is Python2/unittest/WebDriver
. Unfortunately, these natively-exported scripts tend to be very messy and don't run reliably. The purpose of this converter is to clean up and improve the scripts so that they can be used in production-level environments.
File
=>Export Test Case As
=>Python 2 / unittest / WebDriver
- Just copy & paste!
(The full path of the folder is SeleniumBase/integrations/selenium_ide
)
python convert_ide.py [MY_TEST.py]
You should see a [MY_TEST_SB.py] file appear in the folder. (_SB
is added to the file name so that the original file stays intact in case you still need it.)
- You can now copy your new SeleniumBase test script into your test suite. It's ready to be run!