How to install Selenium-IDE?
- Step-1: Firefox installation
Navigate to: https://www.mozilla.org/en-US/firefox/new/
Click “Download” button
Install the downloaded .exe file
Click finish to launch the Firefox browser
- Step-2: Install Selenium-IDE in Firefox browser
Launch Firefox browser
Navigate to http://www.seleniumhq.org/download/
Scroll down until you reach the “Selenium IDE” section (Click on hyperlink)
Click on the “Allow” button to proceed with the installation.
Restart the Firefox browser and the Selenium-IDE appears on the favorite bar
Features of Selenium-IDE:
Menu Bar
It is located at the top most portion of the Selenium-IDE. The most commonly used menus are the File,Edit, Actions and Options menus.
File menu
It contains options to create, open, save, and close tests.
Tests are saved in HTML format.
The most useful option is "Export" because it allows you to turn your Selenium IDE test cases into file formats that can run on Selenium Remote Control and Web-Driver
"Export Test Case As..." will export only the currently opened test case.
"Export Test Suite As..." will export all the test cases in the currently opened test suite.
Edit Menu
It contains usual options like Undo, Redo, Cut, Copy, Paste, Delete, and Select All.
The two most important options are the "Insert New Command" and "Insert New Comment".
The newly inserted command or comment will be placed on top of the currently selected line.
Ø Commands are colored black.
Ø Comments are colored purple.
Selenium-IDE Vxx.x, test cases can be exported only to the following formats:
- .cs (C# source code)
- .java (Java source code)
- .py (Python source code)
- .rb (Ruby source code)
Options menu
It provides the interface for configuring various settings of Selenium IDE.
We shall concentrate on the Options and Clipboard Format options.
Clipboard Format
- The Clipboard Format allows you to copy a Selenese command from the editor and paste it as a code snippet.
- The format of the code follows the option you selected here in Clipboard Format's list.
- HTML is the default selection.
For example, when you choose Java/JUnit 4/WebDriver as your clipboard format, every Selenese command you copy from Selenium IDE's editor will be pasted as Java code. See the illustration below.
Selenium IDE Options dialog box
You can launch the Selenium IDE Options dialog box by clicking Options è Options... on the menu bar. Though there are many settings available, we will concentrate on the few important ones.
Default Timeout Value : This refers to the time that Selenium has to wait for a certain element to appear or become accessible before it generates an error. Default timeout value is 30000ms.
Selenium IDE extensions : This is where you specify the extensions you want to use to extend Selenium IDE's capabilities. You can visit http://addons.mozilla.org/en-US/firefox/ and use "Selenium" as a keyword to search for the specific extensions.
base URL: Keep this checked if you want Selenium IDE to remember the Base URL every time you launch it. If you un-check this, Selenium IDE will always launch with a blank value for the Base URL.
Auto-start record : If you check this, Selenium IDE will immediately record your browser actions upon startup.
Locator builders : This is where you specify the order by which locators are generated while recording. Locators are ways to tell Selenium IDE which UI element should a Selenese command act upon. In the setup below, when you click on an element with an ID attribute, that element's ID will be used as the locator since "id" is the first one in the list. If that element does not have an ID attribute, Selenium will next look for the "name" attribute since it is second in the list. The list goes on and on until an appropriate one is found.
Base URL Bar
It has a dropdown menu that remembers all previous values for easy access.
The Selenese command "open" will take you to the URL that you specified in the Base URL.
In this tutorial series, we will be using http://newtours.demoaut.com as our Base URL. It is the site for Mercury Tours, a web application maintained by HP for web testing purposes. We shall be using this application because it contains a complete set of elements that we need for the succeeding topics.
The Base URL is very useful in accessing relative URLs. Suppose that your Base URL is set to http://newtours.demoaut.com. When you execute the command "open" with the target value "signup ", Selenium IDE will direct the browser to the sign-up page. See the illustration below.
Toolbar
Playback Speed: This controls the speed of your Test Script Execution.
Record: This starts/ends your recording session. Each browser action is entered as a Selenese command in the Editor.
Play entire test suite: This will sequentially play all the test cases listed in the Test Case Pane.
Play current test case: This will play only the currently selected test case in the Test Case Pane.
Pause/Resume: This will pause or resume your playback.
Step: This button will allow you to step into each command in your test script.
Apply rollup rules: This is an advanced functionality. It allows you to group Selenese commands together and execute them as a single action.
This is the best explanation I have seen so far on the web. I was looking for a simple yet informative about this topic finally your site helped me a lot.
ReplyDeleteselenium Classes in chennai
selenium course
selenium Testing Training
I really like reading technology through a post that can make people think. Also, many thanks for permitting me to comment!
ReplyDelete