Starting with Selenium IDE

Selenium IDE is an integrated development environment for building selenium test cases.It is a firefox add-on that allows recording and playing back of tests.It is a very powerful tool for automating web sites and is very easy to use. Since it is only available with firefox it cant be used to run the tests on any other browser.

To start with Selenium you need to install the following


1. JRE : Selenium server needs the java runtime env version 1.5 or higher in order to start.Try running the command : java -version from your command prompt. If your version is 1.5 or higher you are good to go else you will have to install it or add it to your PATH env.

2. Firefox: Install a firefox version greater than 2.0. You can download it here: http://www.mozilla.com/en-US/firefox/



3. Selenium IDE: Using the firefox browser install ide. You can download it here: http://seleniumhq.org/download/



Open a new firefox window and click on Tools.If you see Selenium IDE there you are all set. You have installed Selenium IDE.



Recording your script


1. Open a site say www.google.com using firefox browser.


2. Open Selenium IDE by clicking on Tools->Selenium IDE.


3. Make sure that the red button (record)is clicked.
4. Type "selenium testing" in the search textfield.Click the "Google Search" button.
5. Click the first link - Selenium web application testing system.
6. Right Click and select assertTitle.
7. Stop Recording by clicking on the record button.
8. Save the script by clicking File->Save Test Case As. Make sure that you give the extension as html say give the name as "googlesearch.html".


Your script should look something like below:



Congrats!! You just recorded your first selenium script.


Playing back your script


Playback the script by pressing the play button (green triangle and one line).
Does your script run successfully?

Your script should have failed as shown below:



The script failed because selenium was trying to look for the element -"link=Selenium web application testing system" even before the page was loaded. This is one of the most common reasons why playing back a selenium script fails - trying to locate a field on a page even before the page is loaded. By adding a command -"waitForPageToLoad" this issue can be resolved.

Try running the script after adding the waitForPageToLoad command as shown below.




As you can see the script run should now be a success with all the command executions shown in green.



Congrats again!! You now played back a selenium script successfully.

26 comments:

  1. Valuable information and excellent design you got here! I would like to thank you for sharing your thoughts and time into

    the stuff you post!!
    Microsoft dynamics training

    ReplyDelete
  2. Thanks for sharing this Information, Got to learn new things from your Blog on selenium.
    http://thecreatingexperts.com/software-testing-training-in-chennai/selenium-training-in-chennai/

    ReplyDelete
  3. Thanks for sharing up–to-date on this subject! I find it is very informative and very well written one! Keep up on this quality!

    Testing Training with Live Project

    ReplyDelete


  4. Very well explained, thanks for all the details and you have covered it from very much basics.
    Appreciate the time taken to share the same. Will be sharing with other forums.
    Pratical oriented Selenium Training in Chennai


    Thanks for sharing the best practices, will definitely use it as a reference for our projects.
    Please keep sharing such articles.

    Thanks a lot!!

    ReplyDelete
  5. Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.

    Data Science Training in Chennai
    Data science training in bangalore
    Data science online training
    Data science training in pune
    Data science training in kalyan nagar

    ReplyDelete
  6. Really you have done great job,There are may person searching about that now they will find enough resources by your post
    Devops training in Chennai
    Devops training in Bangalore
    Devops Online training
    Devops training in Pune

    ReplyDelete
  7. I wanted to thank you for this great read!! I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post.is article.
    java training in chennai | java training in bangalore

    java online training | java training in pune

    selenium training in chennai

    selenium training in bangalore

    ReplyDelete

  8. Hello! This is my first visit to your blog! We are a team of volunteers and starting a new initiative in a community in the same niche. Your blog provided us useful information to work on. You have done an outstanding job.

    AWS Online Training | Online AWS Certification Course - Gangboard
    AWS Training in Chennai | AWS Training Institute in Chennai Velachery, Tambaram, OMR
    AWS Training in Bangalore |Best AWS Training Institute in BTM ,Marathahalli

    ReplyDelete
  9. Excellant post!!!. The strategy you have posted on this technology helped me to get into the next level and had lot of information in it.
    python online training
    python training in OMR
    python training course in chennai

    ReplyDelete
  10. A very nice guide. I will definitely follow these tips. Thank you for sharing such detailed article. I am learning a lot from you.

    rpa training in electronic-city | rpa training in btm | rpa training in marathahalli | rpa training in pune

    ReplyDelete
  11. Your post is very nice and it's very useful for enhance my knowledge. Thanks for your worthy concept.
    Devops Training in Chennai | Devops Training Institute in Chennai

    ReplyDelete
  12. Excellent Blog!!! The blog which you have shared here is more informative, This is really too useful and have more ideas and keep sharing many techniques about java. Thanks for giving a such a wonderful blog.
    Java training in chennai | Java training in annanagar | Java training in omr | Java training in porur | Java training in tambaram | Java training in velachery

    ReplyDelete
  13. Thanks for a marvelous posting! I seriously enjoyed reading it, you are
    a great author.I will be sure to bookmark your blog and will often come back in the future.
    I want to encourage yourself to continue your great job, have a
    nice weekend!


    data science training in chennai

    data science training in velachery

    android training in chennai

    android training in velachery

    devops training in chennai

    devops training in velachery

    artificial intelligence training in chennai

    artificial intelligence training in velachery

    ReplyDelete
  14. I appreciate this piece of useful information. CourseDrill academy one of the best leading Training Institute, provides the best Online services with expert Team. For more information visit our site:
    Oracle Fusion HCM Training
    Workday Training
    Okta Training
    Palo Alto Training
    Adobe Analytics Training

    ReplyDelete
  15. I really enjoyed reading this post, big fan. Keep up the good work and please tell me when can you publish more articles or where can I read more on the subject?
    data science institutes in hyderabad

    ReplyDelete
  16. Just saying thanks will not just be sufficient, for the fantasti c lucidity in your writing. I will instantly grab your rss feed to stay informed of any updates. data science course in mysore

    ReplyDelete