Showing posts with label "how to install jar files in selenium" "Selenium Coaching in Delhi" "Setup java path""learn selenium online". Show all posts
Showing posts with label "how to install jar files in selenium" "Selenium Coaching in Delhi" "Setup java path""learn selenium online". Show all posts

How to handle iFrames in Selenium?


A basic example of handling frames at www.espncricinfo.com

import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class Abc
{
public static void main(String args[])
{
WebDriver driver=new FirefoxDriver();
driver.get("http://www.cricinfo.com/");
driver.manage().timeouts().implicitlyWait(3000, TimeUnit.MILLISECONDS);
driver.findElement(By.linkText("Countries")).click();
driver.switchTo().frame(driver.findElement(By.xpath("//*[@id='ciHomeContentrhs']/iframe")));
driver.findElement(By.linkText("Cricinfo")).click();
}
}

Prerequisites to Start Learning Selenium Webdriver


You will need the following to start using Selenium WebDriver or in other words you can say prerequisites required to setup Selenium Webdriver??


  • Java Development Kit (JDK) ( To download it, click here)
  • Eclipse IDE - (To download it, click here)
  • Jar Files (Java Client Driver) - (To download it, click here)