-2

suppose if you click on the contact us page ,in that page you want to click on the india in the list of the countries present in the contact us page.How we can write code for this in selenium

Bhargavi
  • 41
  • 2
  • 5
  • Possible duplicate of http://stackoverflow.com/questions/18597735/clicking-on-a-link-via-selenium-in-python. Also , while posting queries post what is problem you are facing , some reference code snippets – Tanu May 25 '16 at 15:00

1 Answers1

0
driver.findElement(By.id("contact us")).click();
driver.findElement(By.id("India")).click();

Here instead of Id use can use Xpath,Text,CSS also

Pramod Raut
  • 677
  • 3
  • 9
  • 22