"No one is harder on a talented person than the person themselves" - Linda Wilkinson ; "Trust your guts and don't follow the herd" ; "Validate direction not destination" ;

July 01, 2010

Learning Selenium - Part II

In continuation to my earlier post. One of my friend asked me Pagination in Selenium. I got help from one of my team members Avinash.

Learning's are
1. Install Firebug add in to firefox
2. Install Xpather add in to firefox
3. From Existing post I want to goto page 2 of Search Results
4. Choose Xpather Location as shown below


5. Select the Xpath for Selecting Second page
6. Add the below line of code as last line. Only from footer part I am selecting the xpath.
selenium.click("//div[@id='foot']/table[@id='nav']/tbody/tr/td[3]/a/span[1]");
7. Modified code snapshot as below


7. Search Results would take you to page 2 of results
Good Read - Identifying XPath of a element using XPath Query
Happy Reading!!!

No comments: