Total Pageviews

Monday 16 July 2012

Selenium Interduction

Selenium is an open source

Selenium is an open source, functional automation tool for web application

Advantage  of automation:
Advantages 
*security
*ease of use
*energy saving 

*Operation of highly repetitive tasks 

*Faster decision making
*Increased safety
*Better quality control
*Greater precision
*Increased Productivity
*Improved design through simulation (CAD/CAM) 

disadvantages
*price

what is difference between selenium and qtp
QTP
QTP can be used for testing client server applications
QTP is limited to Internet Explorer on Windows.
QTP uses scripting language implemented on top of VB Script


Selenium
Only web applications can be tested using Selenium testing suite
Selenium supports following web browsers: Internet Explorer, Firefox, Safari, Opera or Konqueror on Windows, Mac OS X and Linux
Selenium test suite has the flexibility to use many languages like Java, .Net, Perl, PHP, Python, and Ruby.
Selenium 2.0

selenium components
Selenium IDE
Selenium RC
Selenium Grid

Selenium IDE:
The Selenium-IDE (Integrated Development Environment) is the tool you use to develop your Selenium test cases. It’s an easy-to-use Firefox plug-in and is generally the most efficient way to develop test cases. It also contains a context menu that allows you to first select a UI element from the browser’s currently displayed page and then select from a list of Selenium commands with parameters pre-defined according to the context of the selected UI element. This is not only a time-saver, but also an excellent way of learning Selenium script syntax.
This chapter is all about the Selenium IDE and how to use it effectively.
Installing the IDE
Using Firefox, first, download the IDE from the SeleniumHQ downloads page
Firefox will protect you from installing addons from unfamiliar locations, so you will need to click ‘Allow’ to proceed with the installation, as shown in the following screenshot.

What is Selenium?
Selenium automates browsers. That's it. What you do with that power is entirely up to you. Primarily it is for automating web applications for testing purposes, but is certainly not limited to just that. Boring web-based administration tasks can (and should!) also be automated as well.
Selenium has the support of some of the largest browser vendors who have taken (or are taking) steps to make Selenium a native part of their browser. It is also the core technology in countless other browser automation tools, APIs and frameworks.
Which part of Selenium is appropriate for me?


If you want to
  • create quick bug reproduction scripts
  • create scripts to aid in automation-aided exploratory testing

Then you want to use Selenium IDE; a Firefox add-on that will do simple record-and-playback of interactions with the browser


If you want to
  • create robust, browser-based regression automation
  • scale and distribute scripts across many environments

Then you want to use Selenium WebDriver; a collection of language specific bindings to drive a browser -- the way it is meant to be driven.
Selenium WebDriver is the successor of Selenium Remote Control which has been officially deprecated. The Selenium Server (used by both WebDriver and Remote Control) now also includes built-in grid capabilities.


Selenium RC:
Selenium Remote Control (RC) is a test tool that allows you to write automated web application UI tests in any programming language against any HTTP website using any mainstream JavaScript-enabled browser.
Selenium RC comes in two parts. 
  1. A server which automatically launches and kills browsers, and acts as a HTTP proxy for web requests from them.
  2. Client libraries for your favorite computer language.
Here is a simplified architectural representation....
rc arch diagram
Selenium Remote Control is great for testing complex AJAX-based web user interfaces under a Continuous Integration system. It is also an ideal solution for users of Selenium IDE who want to write tests in a more expressive programming language than the Selenese HTML table format.

How to download and install Selenium IDE?

Downloads

Below is where you can find the latest releases of all the Selenium components. You can also find a list previous releases, latest releases, source code, and additional information for Maven users (Maven is a popular Java build tool).

Selenium IDE

Selenium IDE is a Firefox plugin that does record-and-playback of interactions with the browser. Use this to either create simple scripts, assist in exploratory testing. It can also export Remote Control or WebDriver scripts, though they tend to be somewhat brittle and should be overhauled into some sort of Page Object-y structure for any kind of resiliency.
Download version 1.8.1 released on 01/June/2012 or view the Release Notes

Install:

            how to download and install selenium IDE step by step process

Here i am going to describe how to download and install selenium IDE open source testing tool step by step process.

Seleniu IDE download and install step by step process 
·                     Open Mozilla Firefox Browser.
·                     Type URL : http://seleniumhq.org/download/ in your browser.Selenium IDE download page will get open then click on latest Download version link (Here is 1.3.0) as shown in image bellow. click on that link.
·                      
·                     https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEge6CRQmcZ-KZ_3t5wm_K70J0Lbo3NFDkU1S275gjCD9AninjKPdWcNE7cnSUfl4NQ42NWH5ctGMBQByP-GtQykjNYu2hZMQFBQAXmo8yFbBGjBpwDBIQ4S0IPj0zNZKfDlo9zINxYOKV1Q/s400/how+to+download+selenium+ide.JPG 
·                      When you click on latest Selenium IDE Download version link, Firefox will show one popup saying do you want to allowMozilla Firefox to install selenium IDE or not. Click on Allow button as shown in image bellow.
·                     https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZ4ZITXDD5jaWBaKLOip3ZGIhyXa8xPq5vXg4w8PYed1EwPDkhrEw7k7tAsSS1jUxm0vLZswtUFqfH5aHAmwAzNr_JvuoE24mimT3cpyj9aFyXuk4YiK5GUCgOhIcA9VPuR1JeKxL6r1RS/s400/how+to+install+selenium+ide.jpg
·                     When you click on allow button, Firefox will automatically install Selenium IDE. after completion of Selenium IDE installation, it will show one pop up saying Selenium IDE installation completed. you need to restart your browser to use selenium IDE. Click on Restart Now button as show in image bellow.
·                      https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQXRP20VlY8ABRB5njm_kUnGSbcpon5EwVw-nMiprnFbGKRIT8TTyF9aT2m6ud4QK2JXrdUeiKd4acOYgVoA_S5Yg3cTZ2yTDcqlxCGeUaNgskifpE1615GczOSRJgsJ0y92QB8S1-rBm6/s400/selenium+ide+installation+complete.jpg
·                     When you click on Restart Now button, Firefox will restart automatically. now click on Tools menu list displayed in top. you can see there Selenium IDE as shown in image bellow.
·                      https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh_Ir7GiDunrCgyDEFShkAyHGXdI14101t_cT30HrR4YjmG-o3V-TbnNjxKPaH4aaiMQnQnq6YVypJxn2KiB_zLulmqDm82nONc5cMLQYn3mYf7U6yVAf2iupejh8aCyuUNdzjLTVAidEGq/s400/how+to+start+selenium+IDE.jpg 
·                     Click on Selenium IDE as shown in image above. It will launch Selenium IDE window as shown in image bellow. 
·                     https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjIjDFiwXEO5eAzXZCzOj3OiVghpheFcMyahDTDrtuF9w48ECY_OBc73fRXolsBdu0KLUzzVXPVNnIvxFWeDwV9rSYxDiGphTMuZ51WuX7R7rruEdiavFPUrZsfEcv6kBeRtUdhMsnki5jr/s400/how+to+launch+selenium+IDE.jpg 
So these are the steps to download and install Selenium IDE. Now you can use it to record and play your web application test. Comment here if you face any problem in download and install selenium IDE. I will guide you personally. See my next post to know how to use selenium IDE
download selenium ide, selenium ide download, install selenium ide, selenium, download selenium, selenium testing, selenium ide tutorial, selenium download, selenium documentation, selenium test, free downloads software, open source downloads, selenium tool, download selenium ide for windows, selenium ide extensions, selenium ide plugin, selenium tests, selenium scripts, download ide, using selenium ide, testing selenium, selenium open source, selenium ide help, selenium script, selenium recorder, free download web browser, selenium ide addon, web browser free download, browser free download, selenium plugins, selenium help, selenium ide extension, selenium 2 tutorial, download selenium testing tool, gwt selenium, selenium ide install, selenium linux, 02 downloads, selenium testing software
 Prakash Patolia  

how to use selenium ide toolbar elements

If you are new for using selenium IDE, then first of all you have to understand how to operate Selenium IDE.
Here i have described how to use selenium IDE different elements and its functions.
Speed Controller :
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUAoyeAQDsC4engw03PdfUWTOzlMP3-QNS_cm9gOmp-TInKHZrjjahjYXI556Fb3y5XmKtjxVSaydd7cNROUZ-2VwqtuW1BKmGdsNTJF4I5rqFFbkm9-TvlQP3Ecf-t6aFN1kAw6mO55lX/s1600/speed+controller.jpg


In Selenium IDE, Speed controller is used to control the speed of how fast your test case runs. Set it on fast if you want to run fast test case and set it to slow if you want to run your test case slow.

Run All Button :
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFVQkw2oeP2ztvxEOzEa9oHaCytJNPrd_Xp5dH_6eNApi-mNGX4OER2PAUuQjNzqEGgdu2sul_48Q2q2tDL6gfDhV4tU_ZCMO4dg0tZIvqmn_-rP2eJUG3wqAihU3fnkIm70zdbdefjGOo/s1600/Run+All+button+in+selenium+IDE.jpg
In Selenium IDE, Run All button is used to run the entire test suite. Suppose you have created 5 test cases for you application and stored all them in one test suite and if you like to run all they 5 then open your test suite and press this button. it will run all the 5 test cases one by one. 

Run Button : 
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhtmJT35OrQMt0obFuDBKzt-BcjMzDojRwsrMDXRsljfxBwUEXCGkHmBBH0aGqvIRQyuaBumf6kAgGxruzXMjJ1mVksHa0_iR8nLtkTORojaZbvmyoJsE0_w771sdVr3lVK7pE8pQfUlZX3/s1600/use+of+Run+button+in+selenium+IDE.jpg 
 In Selenium IDE, Run All button is used to run the selected any one test case.


Pause/Resume Button :
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjI6YU8KGIExNwviE7E2F3sHlwZmbhjN7OgUz6R_b9pn4Bq5W_Q_xdILfU8_30j5TSz9YLFm0u5eb2jkSbCTS4rKIratATNLR9a92v37ngDQ7gxmql93HOSPLZj03foMiElWdRGzXeXbqTR/s1600/use+of+pause+button+in+selenium+IDE.jpghttps://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEilxJEmNwWqhZ_-tjxcQcM0zWTwlkommEcq3eEgpSmWH3popJA_CUG8kc6Vx_FDRtMBPHOMUsuQDYXJzXfklGzBYPDVKzuwXzsVEw9f8aSUBRXKOVOmgektMQsdt5HGYotPJYqem_lCRJFp/s1600/use+of+resume+button+in+selenium+IDE.jpg 

  In Selenium IDE, pause button is used to pause the running test case and resume button is used to resume or restart paused test case.

Step Button :
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg9grFM6j3RwMrXSUuv8PctInsEpQO-7MvWuIpEX4HlKCdQNHmBe9b1RDNKuKtXclj9wR4WBScsoHCi6OHalERKvyyGKN9LFhtrl3bxbye_jzLkABjEduuLEEWy-dczf6AjeP8AuEN5B4dI/s1600/use+of+step+button+in+selenium+IDE.jpg
 In Selenium IDE, Step button is used to run test commands manually one by one. Suppose you have paused your test case and now you like to run remaining commands one by one then you can use step button. Basically step button is used debug the script in selenium IDE.

Click to Record/ Stop Recording Button :
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpw39erbaCr6b58qAKJrkxzYBQ78GudYvyuuBmXm9P4J7-YWkjYK_sWdAqELm_Ki6f_vNo6sMMaqur0o4UxPfR2njiYfDH66xtBVyPW44VmHkDkNcsrnoIWH4PLZ3EQ3C4L3SIsfcir6zz/s1600/use+of+click+to+record+button+in+selenium+IDE.jpghttps://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZs5coxfhmccf3o5TvJpAEkQVqegp_vP3f2KDA0EiJTdWYZ6IRACLcWYjj8BVYDdmN2iV6BOp7-oHYC7J9Xip3wYV_ZoJFQ-E6RugC-kWf00c5nMi1PyyK2cCqrtZbPavJ5WnjmoBLGjCQ/s1600/use+of+click+to+stop+record+button+in+selenium+IDE.jpg

In Selenium IDE, Record button is used to record the users browser navigation and creating test script for reusing it and stop record button is used to stop recording.

Command Table :
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLQAZYQgHGpNup0GQ1dxt6GuGtr94Pj3JoxoExt0qXYTLLmGhMwsUnq8tW7NhZKUNUue88FHfFZ6QXM2hyfm4vczV5jMaOvIQWEKcRLYIhxcj65ttnZWFTVYqnGzQPzCuT8Ih3HTNnDkxM/s320/command+table+in+selenium+IDE.jpg














Command table shows the recorded commands. you can also modify commands or insert any command in between. there are three elements in each command.
1.                  Command : Command column describes name of command.
2.                   Target : Target column describes Target element id or name or Xpath
3.                  Value : Value column describes Value of an element 


Selenium IDE - free web application testing tool

Selenium IDE is software testing tool for web applications. It provides record and playback facility to regression test any web application. To useselenium IDE, It is not compulsory to have any programming language knowledge. Selenium IDE is open source web application testing tool. Selenium IDE provides facility to export recorded script in many languages like HTML, Ruby, RSpec, Python, C#, JUnit and TestNG. You can use these exported script in Selenium RC. To using selenium IDE you have to download it from link given here. Click here to Free download Selenium IDE.You can find latest released version for downloading.But one thing i would like to clarify here is that selenium IDE supports only Mozilla Firefox web browser. So don't try to download it in any other web browser. See my next post to learn how to download and install Selenium IDE in step by step process.


2 comments:

  1. Really nice blog!!
    It is quite unique way to describe selenium test selenium IDE tool. It is really good explanation for the beginner. If anyone want to lean more, he/she can visit Software Testing

    ReplyDelete