In site goIndigo and navigating to View/Change booking and selecting E mail itenary , a pop comes , I want to close that Pop up using Close button in Pop up:
But I am getting Error that Element is not visible;
My code is as below:
WebDriver drv= new FirefoxDriver();
drv.get("https://book.goindigo.in/?wt_mc=googlesearch.brand&gclid=CjwKEAjwxoG5BRCC7ezlzNmR8HUSJAAre36jSbKPBIdunIi2WUecy4wVPCFnqTv73JMeG95oUjTquxoCRlPw_wcB");
drv.findElement(By.xpath("//a[text()='Flight Status']")).click();
drv.findElement(By.xpath("//a[text()='View / Change Booking']")).click();
drv.findElement(By.xpath("//input[@id='indiGoRetrieveBooking_RecordLocator']")).click();
drv.findElement(By.xpath("//input[@id='indiGoRetrieveBooking_RecordLocator']")).sendKeys("abcdef");
drv.findElement(By.xpath("//input[@id='indiGoRetrieveBooking_EmailAddress']")).sendKeys("pandey");
drv.findElement(By.xpath("//input[@id='emailButtonId']")).click();
String mainhandle = drv.getWindowHandle();
WebElement from =drv.findElement(By.xpath("//div[@class='buttonGlbl']"));
from.click();