Selenium buildings
Selenium have 3 entry fields,which are...
1. Command
2. Target
3. Value
here,commands are categories as three types
1)Action-used to manipulate (like type, select, select & wait)
2)Accessors -values are stored in variable (like StoreTitle)
3)Assertions-verify, assert, waitforverifytext, assert text, waitfortext
Target-which is used to identify the elements by following the attributes are
name, id, css, xpath, etc.,
Value-Its assign value for the elements.
Image 1-Sample Test
View the selenium scripts
The selenium scripts are view as two panes
1)Table
2)Source as HTML
From both panes are editable
First Test start with Selenium IDE in Firefox browser
1)Initially selenium ide is started in recording mode(right side pink color)
2)To stop (red color display) and start is present in it
3)After start goto browser>type to test URL- what you want
4)Its recording the test what you work with website in Firefox browser
5)The test results are display in log
Find button in Selenium IDE
After the element attribute in Target as
like
1)link=Download or
2)css=a[title="Get Selenium"] or
3) //a[contains(text(),'Download')])
By clicking the find button in selenium ide,its highlight the mentioned element attribute in yellow color
How to retrieve the Xpath attribute for the element
Its very easy to find xpath for the element by using Firefox addon as,
step 1:inspect the element to you want
step 2:right click->copy Xpath
Selenium have 3 entry fields,which are...
1. Command
2. Target
3. Value
here,commands are categories as three types
1)Action-used to manipulate (like type, select, select & wait)
2)Accessors -values are stored in variable (like StoreTitle)
3)Assertions-verify, assert, waitforverifytext, assert text, waitfortext
Target-which is used to identify the elements by following the attributes are
name, id, css, xpath, etc.,
Value-Its assign value for the elements.
Image 1-Sample Test
View the selenium scripts
The selenium scripts are view as two panes
1)Table
2)Source as HTML
From both panes are editable
First Test start with Selenium IDE in Firefox browser
1)Initially selenium ide is started in recording mode(right side pink color)
2)To stop (red color display) and start is present in it
3)After start goto browser>type to test URL- what you want
4)Its recording the test what you work with website in Firefox browser
5)The test results are display in log
Find button in Selenium IDE
After the element attribute in Target as
like
1)link=Download or
2)css=a[title="Get Selenium"] or
3) //a[contains(text(),'Download')])
By clicking the find button in selenium ide,its highlight the mentioned element attribute in yellow color
How to retrieve the Xpath attribute for the element
Its very easy to find xpath for the element by using Firefox addon as,
step 1:inspect the element to you want
step 2:right click->copy Xpath
No comments:
Post a Comment