Reputation: 1
I am unable to close popup (Find attached screenshot) in the website>> https://www.lambdatest.com/selenium-playground
I tried closing the element by using locators but I got element not interactable error and also I tried with getWindow Handle method but no use. Please help me on this.
Upvotes: -1
Views: 757
Reputation: 1
You need to find the close button and click as follows.
WebElement alertBox = driver.findElement(By.xpath("//*@id='exit_popup_close']"));
alertBox.click();
Upvotes: 0
Reputation: 387
You need to click on X button. Here is the locator: css -> #exit_popup_close
Upvotes: 0
Reputation: 1
Below code used for alert/pop
Thread.sleep(3000); driver.switch().to.alert().dismiss()
Try to use above one.
Upvotes: -1