I'm trying to select the highlighted element below (which is a "window close" button):
There is one other element with class='icon-Dismiss' on the page, but none with class='dialog-close'.
What I have tried so far:
driver.findElement(By.xpath("//*[@class='icon-Dismiss' and @class='dialog-close']"))
driver.findElement(By.className("dialog-close"))
driver.findElement(By.xpath("//*[@id='contentBox']"))
In all cases however, I receive the following error:
no such element: Unable to locate element
Does anyone have an idea on how I can select this element?