'Impossible to click on element with selenium when browser not on mac current space
I'm using selenium in python to control a website. I use Firefox. I want to click on a mat-select element.
When Firefox is on one of my Mac used spaces (or desktops), all works fine. When I switch to another space to work on other full screen applications, I get this error :
s
Stacktrace:
WebDriverError@chrome://remote/content/shared/webdriver/Errors.jsm:183:5
ElementClickInterceptedError@chrome://remote/content/shared/webdriver/Errors.jsm:282:5
webdriverClickElement@chrome://remote/content/marionette/interaction.js:166:11
interaction.clickElement@chrome://remote/content/marionette/interaction.js:125:11
clickElement@chrome://remote/content/marionette/actors/MarionetteCommandsChild.jsm:203:24
receiveMessage@chrome://remote/content/marionette/actors/MarionetteCommandsChild.jsm:91:31
My code that works if the browser is in my current work space on Mac:
xpath='//mat-select[@placeholder="Duration"]'
WebDriverWait(driver, 2).until(presence_of_element_located((By.XPATH, xpath)))
element = driver.find_element(By.XPATH, xpath)
print(element.is_enabled()) # return True
print(element.is_displayed()) # return True if browser in my space, False otherwise
element.click()
My brother is maximized, I've try many things read on forums, like using javascript to scroll, to move the cursor etc. without any success.
Do you have any idea on how to click this button?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
