Tuesday, 25 December 2018

New Selenium IDE supports Chrome & more features


       Selenium Integrated Development Environment best known as Selenium IDE, is the simplest and easiest tool in whole Selenium suite to install and get introduce to selenium environment for the beginners. This was initially released as a Firefox add-on that creates tests quickly through record-and-playback functionality. This was even being used by the Selenium advanced users to identify the objects on a page using locator techniques such as xpath, css, id etc. After the recent changes in Firefox browser, Selenium IDE has stopped working for a while now.

But Selenium team has just released new Selenium IDE. 

Let’s discuss the new features of latest Selenium IDE in this post.

    1. Built as Web Extension & Chrome Support:
The latest Selenium IDE is built as a web extension. Because of this, now we have  Selenium IDE support for chrome browser as well. The Sideex open source project was used as a base to build this IDE.
    Installation in chrome:
a.   Open this in your chrome browser and click on “Add to Chrome”


b.   Once you add it, you can seeicon on top of your browser, beside the address bar.
c.   If you click on the icon, Selenium IDE would open up as a popup,

d.   You can start using it, by clicking on “Record a new test in a project” and naming it.
    Installation in firefox:
a.   Open this in your firefox browser and click on “Add to Firefox”
b.   Once you add it, you can see  icon on top of your browser, beside the address bar.
          c. Other steps are same as above.

2. Improved locators:
 Now selenium IDE supports auto populated, improved, multiple fallback locators. Once you record any test, select a step where you want to change the object locator. Then click on the “Target” drop down. You can see multiple options like css, xpaths, name, id etc.

     3. Conditional & Control flows:
The latest Selenium IDE supports Conditional flows by using if, elseif, repeatif commands. With these commands, we can specify the conditions to make our recorded script more intelligent.
                        
IDE also supports control flow using while command. A condition can be specified to execute a specific step repeatedly.

4. In-built implicit wait:
Selenium IDE will now automatically wait for every command, every command will wait for the page to load. Commands which take a locator will wait for the element to appear. This way we no need to use explicit waits.

5. Adding assertion and verifications while recording itself:
Now users can add assertions and verifications in tests by using the context menu on the page. Once the page gets launched from IDE, select the element that needs to add as assertion. Now right click on that element. You can see a context menu, with multiple options.

    
6. Running in CI:
We can execute the selenium IDE scripts in CI now. If you click on 3 dots next to save icon in selenium IDE, you can see an option called “Running in CI”. Clicking on this option takes you to here. This page has very clear explanation on how to execute these .side scripts though CI. We can also use selenium server to run the tests in remote machines.


According to Webdriver creator Simon Stewart, below features are in pipeline for Selenium IDE team.

1. Exporting Selenium IDE Scripts to Programming languages (Java/JUnit/Python/PHP):
    Exporting the .side Scripts to programming languages is not supported yet in the latest IDE. But this will be supported in future starting with Java.

2. Data driven Testing:
    Even the old IDE was not supporting data driven testing. But it is being considered in the latest IDE. We may see this feature as well in future.

1 comment: