Selenium Program 3: Use of Explicit Wait
Автор: Selenium Tutorial Study
Загружено: 2017-07-06
Просмотров: 228
This tutorial will help you in understanding the use of Explicit Wait.
Note: If your script is correct and not able to pass values using sendKeys, Use explicit wait this may solve your issue up to some extent.
Program for your use:
driver.findElement(By.xpath("//*[@id='identifierId']")).sendKeys("Your email id");
driver.findElement(By.xpath("//*[@id='identifierNext']/content/span")).click();
WebDriverWait waitforpassword= new WebDriverWait(driver,10);
//10 represent 10 seconds.
WebElement element = waitforpassword.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[@id='password']/div[1]/div/div[1]/input")));
// the copied xpath is xpath of password
driver.findElement(By.xpath("//*[@id='password']/div[1]/div/div[1]/input")).sendKeys("Your password");
driver.findElement(By.xpath("//*[@id='passwordNext']/content/span")).click();
// Lets try the above script now.
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: