Module16, part 1 | Selenium Forum
M
Posted on 26/05/2016
it clicked on create account button then complained it's unable to locate the element. Are you facing the same issue?

M
Replied on 26/05/2016

send me the code(in text) i'll try and run it.


M
Replied on 27/05/2016

import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class Front_back_button {

public static void main(String[] args) throws InterruptedException {
WebDriver driver = new FirefoxDriver();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
driver.manage().timeouts().pageLoadTimeout(10, TimeUnit.SECONDS);
driver.navigate().to("http://www.gmail.com");
driver.findElement(By.xpath("//*[@id='gmail-create-account']")).click();
//Thread.sleep(50000L);
//driver.navigate().back();
//Thread.sleep(5000L);
//driver.navigate().forward();
//Thread.sleep(5000L);
//driver.quit();

}

}


M
Replied on 27/05/2016

hey, i figured this one out. please ignore this issue. thank you!