This question already has an answer here:
I need to clear the Chrome cache during my automated testing...
]1
I need to uncheck the 1st and 2nd checkboxes, then click clear data. However, i am unable to do so. I did some research and found that i had to use the /deep/ selector, however, it still doesn't seem to work.
In my code, I tried to locate it as a web element, before using javascript to execute the click
js.executeScript("window.open()");
ArrayList<String> tabs = new ArrayList<String> (webDriver.getWindowHandles());
webDriver.switchTo().window(tabs.get(1));
webDriver.get("chrome://settings/clearBrowserData");
WebElement browsingHistory =
wait.until(ExpectedConditions.elementToBeClickable(By.cssSelector("* /deep/ #checkbox")));
js.executeScript("arguments[0].click()", browsingHistory);
Doesn't seem to be working... does anyone have any idea? I can get selenium to open a new tab, but that seems to be about it
Thanks!