String selector = ".rmcAlertDialog .buttons :first-child"; RemoteWebElement selection = (RemoteWebElement) driver.findElement(By.cssSelector(selector)); WebDriverWait wait = new WebDriverWait(driver, 60); WebElement element = wait.until(ExpectedConditions.elementToBeClickable(selection)); if (element == selection) selection.click();
But the element in question (a button) is not responding to the click.
If I click the button manually it works so its not the web page at fault, but the automation.
I have verified the button is there by comparing it's text content.
updated for clarification
This code works (or worked) for most buttons. The code is from a script interpreter which is parsing:-
select ".rmcAlertDialog .buttons :first-child" click
This code was working prior to more recent versions of chrome/selenium/chromedriver.
The code now doesn't work for some buttons.
selection.click() IS being called (verified in a debugger), as element will always equal selection, it just is not working.
.buttons is the class name of the container div for the button(s)