i was trying to handle bootstrap model popup but unable to handle can you plz help me on that how to handle, its very urgent
I have tried with below code but its noot working :
driver.get("https://www.veritread.com/carrier/");
//clicking on the any load then popup will be open
driver.findElement(By.xpath("//article[1]")).click();
Thread.sleep(3000);
String popup=driver.getWindowHandle();
driver.switchTo().window(popup);
//Trying to get text
String str= driver.findElement(By.xpath("//*[@id=\"modalPopContainer\"]/div/div/detail/section[3]/h1")).getText();
System.out.println("Text of element: "+str);
URL that i am trying : https://www.veritread.com/carrier/search
When click on the any load a model popup will be open , after that unable to perform any action on the page...
Thanks
Manish Kumar
Instructor
Ashish Thakur Replied on 15/02/2019
I visited the site and noticed that the thing you're referring to is not a popup, instead, it is a part of the page. This cannot be handled with a popup handler