Friday, August 30, 2013

Forward, Back, URL and Refresh with Selenium Webdriver



// back button
                        driver.navigate().back();
// Forward button
          driver.navigate().forward();
// Navigate to particular URL
          driver.navigate().to(“http://www.google.com”);
 // Refresh
1. driver.findElement(By.id("firstname-placeholder")).sendKeys(Keys.F5);
2. driver.navigate().refresh();
3. driver.navigate().to(driver.getCurrentUrl());
4. driver.get(driver.getCurrentUrl());
5. driver.findElement(By.id("firstname-placeholder")).sendKeys("\uE035");

No comments:

Post a Comment