How to close additional window as in screenshot | Selenium Forum
M
Posted on 19/12/2015
on opening thE link
https://uk.webuy.com/search/index.php?stext=*&section=&catid=956

window opens as shown in screenshot. It's neither a frame , nor pop up and alert.

I tried with all these 3 .

Now please let me know how to close this ..Is there any way?

M
Replied on 19/12/2015

Please find correct Screenshot attached..Ignore previous one

Responsive image

M
Replied on 20/12/2015

click on X


M
Replied on 21/12/2015

There is no xpath for X

We have common x path for whole div.. Attaching screenshot

Responsive image

M
Replied on 21/12/2015

i think website is using javascript. give me some time i will take look at it.


M
Replied on 22/12/2015

use actions class

WebDriver driver = new FirefoxDriver();
driver.get("https://uk.webuy.com/search/index.php?stext=*&section=&catid=956");
Actions action = new Actions(driver);

// To click on the element
action.moveToElement(
driver.findElement(By.xpath("html/body/div[9]/div/a/div")))
.click().perform();