I am trying to dismiss a Google ad on a website, but have no idea how to access the #dismiss-button element. Tried switching to that iframe, get "element not found"
.pause(3000)
.frame(1)
.pause(3000) //or wait for element to be visible, same result
.click("#dismiss-button")
EDIT: Tried to get the element by the full Xpath and now I get the "Element is not clickable at point" error. I still can't seem to find what is overlapping the button. Any advice is much appreciated.
We need more code example of how you switch your iframe.
You can also try using
moveToElement()
followingmouseButtonDown()