mardi 26 décembre 2017

how to handle this popup on "http://ift.tt/LpUYtP"

title : handle popup box selenium code for handle div pop on same windows //package booking;

import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;


public class Dubai {
    public static void main(String[] args) throws Exception {
    System.setProperty ("webdriver.chrome.driver",
                       "C:\\Users\\miyau\\Desktop\\test\\chromedriver.exe");
        WebDriver driver = new ChromeDriver();
        driver.get("http://ift.tt/LpUYtP");
        driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
        driver.findElement(By.xpath("//div[text()='Not Now']")).click();
        System.out.println("operation complit");
      }
 }
// snapshot of popup## Heading ## 

enter image description here

Aucun commentaire:

Enregistrer un commentaire