Saturday, September 19, 2015

SPQA - A Mini-framework for Selenium/Python Automation

Please visit: https://github.com/seleniumpythonqa/SPQA

Topics covered include:
  • Desktops
  • Chromedriver (desktop & Android)
  • Browserstack (desktops & devices)
  • Appium - XCODE iOS emulators
  • Chrome Devtools Mobile Emulators
  • Selendroid (Android & Android Virtual Devices)

Chromedriver: "Element is not clickable at point (x, y). Other element would receive the click.."

If you've done any automated testing with Chromedriver, you'll likely have come across the following classic error at some stage:
WebDriverException: Message: unknown error: Element is not clickable at point (x, y). Other element would receive the click: <div> class='header'>...</div>
It's triggered by a block like this one:

element = self.driver.find_element_by_css_selector("a.terms")
element.click()


The solution? Use javascript:

self.driver.execute_script("document.querySelector('a.terms').click();")

Note that the error above is confined to Chrome/Chromedriver only. The JS solution works well cross-browser, cross-device and cross-platform.

More on Stack Overflow