WebDriver driver=new FirefoxDriver();
Thread.sleep(3000);
driver.get("https://www.google.com/gmail/about/");
driver.manage().timeouts().pageLoadTimeout(40,TimeUnit.SECONDS);
//Clicking on Create account link
driver.findElement(By.xpath("//a[@href='https://accounts.google.com/SignUp?service=mail&continue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3Fpc%3Dcarousel-about-en']")).click();
driver.manage().timeouts().pageLoadTimeout(40,TimeUnit.SECONDS);
Assert.assertTrue(driver.findElement(By.xpath("//input[@name='firstName']")).isDisplayed());
线程“主”org.openqa.selenium.NoSuchElementException 中的异常:无法找到元素://input[@name='firstName']
如何解决这个问题?
陪伴而非守候
白板的微信
相关分类