<

Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x

How to install Selenium IDE and a basic loop for quick automated browser testing.

Published on
5,704 Points
2,404 Views
3 Endorsements
Last Modified:

How to install Selenium IDE and loops for quick automated testing.

Get Selenium IDE fromhttp://seleniumhq.org


  • Go to that link and select download selenium in the right hand column
  • That will then direct you to their download page.
  • From that page select to download the latest version of the selenium IDE

This extension will allow for the use of loops, goto and gotoIf's.

 

  1.  Launch Selenium IDE from Firefox and open the options menu within Options
  2.  Browse then Add the sideflow.js file to the "Selenium Core extensions (user-extensions.js)" field
  3.  Select OK
  4.  Close the IDE and then re-open it.

Adding-loop-js.jpg

  • The image above this is just an example of where you would want to add your loops.js file.

To set up a generic loop for testing enter the following values into the table.

 

Command: store | Target: Any Numerical Value | Value: Y
Command: store | Target: 0 | Value: X
Command: label | Target: target1 | Value:

 


  • The stored target for Y is how many times the loop will be performed.
  • To turn the recorder ON use the button in the top right corner.
  • Then with the recorder ON perform whatever action you wish to get automated within firefox.
  • As you perform certain actions you will notice it appearing in the driver.

Once that task has been completed, put the following at the bottom of the table.

 

Command: store | Target: ${X}+1  | Value:  X
Command: gotoIf  | Target: ${X}<${Y}  | target1

Now the test is ready to be run with the loops. Here is a quick example of a simple test to run.

Basic-search-loop.jpgIn the example above, automation will perform a search on bing two times. This is of course just an example, you likely would not want to do this as part of your testing.


Another handy thing within Selenium IDE is that you can change your clipboard format.

Clipboard-format.jpgHere is a helpful link for additional documentation from Selenium: http://docs.seleniumhq.org/docs/02_selenium_ide.jsp

http://www.seleniumhq.org/

3
Comment
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
0 Comments

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Join & Write a Comment

The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month