- Install Firefox
- Install Selenium plugin for firefox [1]
- Start a firefox browser and start selenium IDE. (tools> Selenium IDE)
- Goto Options>Options>Formats of Selenium IDE user interface.
- Select one from the list of formats which is closely related to your test platform.
- ex: select Java/Junit4/Webdriver and click on source.
- Copy and save the code from Selenium IDE Format Source to a local location and close the window.
- Click on Add in Selenium IDE Options
- Give a proper name for the new format (ex: Jave/ CustomJunit/ WebDriver)
- Copy the content of the step 6 in to the “Selenium IDE Format Source” window.
- Save and restart the Selenium IDE.
- You can edit this template as per your preference. Edit relevant formating as mentioned in below image.
- change package name
- add/remove imports
- etc
- Now you are done with a custom format for your test generation.
Perform UI actions you need to add in your test case.Now you will see that those actions get recorded in Selenium IDE. [2] - Now File> Export Test Case as> Jave/ Custom/ WebDriver
- Save the test-case into your test project and execute it
[1] http://docs.seleniumhq.org/projects/ide
No comments:
Post a Comment