I have a web application which I am automating using WebDriver and Python
.
The issue is that there is a menu something like this
Grab the element you want to click:
# Or using xparth or something
element = driver.find_element_by_css_selector(css_selector)
Click it using javascript:
driver.execute_script("$(arguments[0]).click();", element)
NOTE: I'm using jQuery otherwise select it native with javascript
If your application uses jQuery
you can use it to specify a target element which will simplify your work. E.g.
$('.targetClass')
You can use JavaScriptExecutor
For Eg. - document.getElementsByClassName('post-tag')[0].click();
Issue that JS via JavaScriptExecutor
(JavascriptExecutor(webdriver)).executeScript("document.getElementsByClassName('post-tag')[0].click();");