Can i import python script in selenium ide

can i import python script in selenium ide

You can run your macro from your python script or you can run your python script from your macro using XRun or XRun and wait

Yes you can import Python Script in selenium IDE.

Converting IDE a script to Python

  1. Open the .htm script in Selenium IDE.

  2. Select File > Export Test Case As > Python - Selenium RC. A .py file extension associates the file with Python. Because the exporter creates class names based on the Python script file name, the file name should be limited to “safe” characters such as letters, numbers and underscores. A dash will create an invalid class name, as will other ‘operator’ characters.

  3. Edit the Python script as needed in Python IDLE or a text editor.

Please note that Scripts run in the Selenium Grid / Hudson environment require changes to the test case class definition and setUp( ) as described here.
See the comments below regarding non-native Selenium statements (ex: while, goto) and Verify statements.

For more info, check out this guide.