Showing posts with label Sample Selenium IDE Test Script Recording. Show all posts
Showing posts with label Sample Selenium IDE Test Script Recording. Show all posts
Wednesday, November 5, 2014
On 6:57 AM by Unknown in Firefox, Sample Selenium IDE Test Script Recording, Selenium, Selenium IDE, test script 15 comments
Sample Selenium IDE Test Script by Recording:
We will use the Mercury Tours website as our web application under test. It is an online flight reservation system that contains all the elements we need for this tutorial. Its URL is http://newtours.demoaut.com/ and this will be our Base URL.
NOTE: The site http://newtours.demoaut.com/ at time is down and not available to work on. We have raised this issue with HP
- Create a Script by Recording
Let us now create our first test script in Selenium IDE using the most common method – by recording. Afterwards, we shall execute our script using the playback feature.
Step 1:
- Launch Firefox and Selenium IDE.
- Type the value for our Base URL: http://newtours.demoaut.com/.
- Toggle the Record button on (if it is not yet toggled on by default).

Step 2:
- In Firefox, navigate to http://newtours.demoaut.com/. Firefox should take you to the page similar to the one shown below

Step 3:
- Right-click on any blank space within the page, like on the Mercury Tours logo on the upper left corner. This will bring up the Selenium IDE context menu. Note: Do not click on any hyperlinked objects or images
- Select the “Show Available Commands” option.
- Then, select “assertTitle exact:Welcome: Mercury Tours”. This is a command that makes sure that the page title is correct.

Step 4:
- In the “User Name” text box of Mercury Tours, type an invalid username, “invalidUN”.
- In the “Password” text box, type an invalid password, “invalidPW”.

Step 5:
- Click on the “Sign-In” button. Firefox should take you to this page.

Step 6:
- Toggle the record button off to stop recording. Your script should now look like the one shown below.

Step 7:
- Now that we are done with our test script, we shall save it in a test case. In the File menu, select “Save Test Case”. Alternatively, you can simply press Ctrl+S.

Step 8:
- Choose your desired location, and then name the test case as “Invalid_login”.
- Click the “Save” button.

Step 9:
- Notice that the file was saved as HTML.

Step 10:
- Go back to Selenium IDE and click the Playback button to execute the whole script. Selenium IDE should be able to replicate everything flawlessly

Subscribe to:
Posts (Atom)
Search
Popular Posts
-
Sample Selenium IDE Test Script by Recording: We will use the Mercury Tours website as our web application under test. It is an online flig...
-
Selenium Commands – Selenese Selenese commands can have up to a maximum of two parameters: target and value. Parameters are not required al...
-
Locating GUI Elements Locating elements in WebDriver is done by using the “findElement(By. locator ())” method. The “locator” part of the co...
-
Answer 60 : While using java you need to create instance of DefaultSelenium class and pass it four parameters – selenium = ne...
-
Answer 27 : You can use “store” command to achieve this. You can save result of an evaluation in a variable and use it later in your Sele...
-
Answer 34 : This is because Selenium IDE does not support execution of test in any other language than Selenese (language of Selenium IDE...
-
Answer 18 : You need to use context menu to add check points to your Selenium IDE tests Answer 19 : There are two ways to edit tests...
-
Answer 57 : You can specify port while running the selenium server as – java -jar selenium-server.jar –port 5555 Answer 58 : ...
-
Answer 21 : This entirely boils down to operations you are carrying out with Selenium. Though you would definitely be using following Sel...
-
Answer 24 : CSS location strategy can be used with Selenium to locate elements, it works using cascade style sheet location methods in wh...
Shaik. Powered by Blogger.
