Wednesday, October 30, 2013

Getting start with Selenium IDE

when i started to learn about the test automation tools i kinda attached to pure coding with java web driver. That was so interesting and logical to learn. But as a starter i have to learn how Selenium IDE works too. So here i'm explaining some basic functionalists that we can do with IDE to play around with the tool 

Basically IDE is used to automate the manual testing functionality in web based applications. This is mostly suitable for long term   and rapidly changing type of a projects. IDE supports many types of languages, such as XML, HTML, JAVA, C# and many more. 

it already has pre-configured parameters as commands where users can simply call them or users are free to define there own command as well. If a user wants to add any command then he/she can write the function in any  language like java and that can be added from "Core extensions" section in the tool 

Below is the tool that you get


as given in the diagram when we want to record a rest case or an activity that we do on the browser we can simply click on the record button, so that all the activities will be recorded in the IDE step by step. Later this can be extracted as a text, XML or HTML file. 

Once the recording is done a test suite will be generated, If the user wants he/ she can again change the order or the command of the test case. 

Here are some example scenarios 
01.Calling a URL and input some value
Calling the "www.google.lk" and search something. You can open your IDE and type the same commands and see :) 

Loggin Scenario
openhttp://www.google.lk
typeXpath=.//*[@id='gs_htif0']
typeid=gbqfqThis is a test scenario
clickAndWaitXpath=.//*[@id='gbqfb']

02. Mouse over actions 
This example is to handle mouse over menus and selects a sub menu 

MouseOver
openhttp://ibuy-shop.com/
mouseOverXpath=.//*[@id='header']/div[2]/ul/li[1]/a
mouseOverXpath=.//*[@id='header']/div[2]/ul/li[1]/ul/li[2]/a
clickAndWaitXpath=.//*[@id='header']/div[2]/ul/li[1]/ul/li[2]/ul/li[1]/a

03. Select a data from date picker and a value from drop down 
when we want to select a value from a drop down menu or from a date picker java calender script we can use the same method of sending the value as a text to the xpath

DateAndDropDownValuePicker
openhttp://www.gic.gov.lk/
clickAndWaitXpath=.//*[@id='btn_menu']/ul/li[3]/a/img
clickAndWaitXpath=.//*[@id='ja-col']/div[3]/table/tbody/tr[5]/td[3]/a/span
typeXpath=.//*[@id='startStation']
typename=startStationABL
typeXpath=.//*[@id='endStation']
typename=endStationFOT
typeXpath=.//*[@id='datepicker']
typename=datepicker2013-10-23
clickAndWaitXpath=.//div[2]/table/tbody/tr[9]/td[2]/input






No comments:

Post a Comment