Why we loved Selenium IDE

Yeah, “loved”, you guessed it right!! Selenium IDE is going to be discontinued from Firefox 55 onwards. Well we wont go to the reasons behind that. You can read that here.  As we gear up for our next upcoming batch for CP-SAT Training we take back and look into some interesting things about this cool plugin.

As a CP-SAT Certified Trainer and as part of CP-SAT Curriculum we  always start our training with Selenium IDE. The reasons are many but boils down to these –

  • Manual Testers found it motivating to see they can automate their test and generate script using a simple record and playback facility. This boosts their confidence and gets them to the groove.
  • QTP enthusiasts could relate to it easily !!

Half the battle is won and your participants are now raring to go ahead. Selenium IDE gives lot of confidence and enthusiasm to the manual testers who are exploring to start their career in Automation. Since its vast and thsi post isn’t going to be a tutorial on Selenium IDE, we will look into some interesting things about this awesome tool –

Readymade Locators:

When you start recording the script you will see that it gives you all type of locators as much it can in the form of Selenese commands. Be it id, xpath, css or link. This way it makes it easier to copy paste the locators to further another editor like Eclipse.

Another plugin which similarly gives all locators of an element is Qbot.

As you progress in the training and start exploring simple Java commands to achieve your task you will see a slight dip in the learning curve of students. You will see participants struggling with Java syntax and more. Thats where the Clipboard format comes into your rescue!!

Clipboard Format

The Clipboard Format helps in converting your Selenese commands to a programming language syntax like C#, Java, Python or Ruby!! Thats it. Participants are now happy that they can atleast not worry about the syntax. Please note that not all Selenese commands will get converted into your programming language syntax. For e.g. mouseover command doesnt get converted into Actions Class in Java.

Formats

 

Similarly with Clipboard Format as you go further the Format option gives you the code with entire Junit/TestNG annotations. You don’t need to bother whether you have included the all the pre, test and post annotations. I have seen many participants who practice the code/exercises during the CP-SAT training or after the training use Selenium IDE for recording their scripts so that they hit less keystrokes. Infact i use it always a starting point whenever i want to do Automation pilot for our consulting projects, unless ofcourse the application is not supported by Firefox.

Regular Expressions

Often in the 1st day of the CP-SAT training itself you will find QTP enthusiasts asking this question – Does Selenium supports Regular Expressions? Ofcourse it does. Just use regexp with the text in the command window and it will give you the output. For e.g. regexp:Web[Dd]river command will work exactly same as for “D”phere and “d”river. That means it will return the values having text WebDriver as well as Webdriver.

Running tests on Chrome

Another question often asked is can we run the script on Chrome since its only a Firefox plugin and Chrome being a popular browser. Often participants may feel this question little silly but actually it does!

Just go to

  • Options–>Options–>WebDriver tab.
  • Check the option to ‘Enable WebDriver Playback’ from opened tab
  • Provide ‘chrome’ value in text box and click OK button.

As you can see from the image not only chrome it also supports other browsers too.

JavaScript Support

With Javascript support i can store values and put an if condition to verify

For e.g.

var A=Number(“${20}”.substr(3).replace(/,/g,”)); var B=Number(“${30}”.substr(3).replace(/,/g,”)); var C=Number(“${40}”.substr(3).replace(/,/g,”)); var D=false; if (A>=B && B>=C) D=true; D

I can put the entire above command in the command window and execute and it will give the result  in the log. Often i can use the above script to verify the price sorting in e-commerce sites like Flipkart, Amazon, Crossword etc.

Nevertheless these are some features and there is ofcourse a lot more which we cover in Selenium IDE.

But stopping Selenium IDE from Firefox 55 version wont stop us in using Selenium IDE, isnt it? We still can install older versions of Firefox from https://ftp.mozilla.org/pub/firefox/releases/ and run Selenium IDE from there. But yes we will never see any new development on this for some time.

So for now Adieu Selenium IDE!!!

PS:

Free Java Boot Camps on weekends starting from 23-Oct. For more details please click here

Online Selenium Weekday batches and Weekend batches starting from 9th Oct. For more details please click here for Weekdays and Weekend batches

Leave a Reply

Your email address will not be published. Required fields are marked *