everyone. I would like to expose my problem. My tests started to fail on Safari since I did upgrade to Safari 17, IOS Sonoma 14.1. In particular, is the click event of an element for example. Element.click() or button.click()
elem = web_driver.find_element(By.XPATH,Mylocator)
self.mouse_over(elem)
elem.click()
it seems that the click event is not released, only by doing the click with JS, I can get it to work.
web_driver.execute_script("arguments[0].click();", elem)
I want to point out that the button is visible and not hidden from some other elements and I have no problems with other browsers (Chrome, Firefox, Edge). I had no problems even with Safari before the upgrade, everything worked fine.
Has anyone had my problem? if yes did you solve it? I would not like to use js all the time to perform my click tests. Any info is important thank you.
IOS Sonoma 14.1
Safari 17.1
Selenium 4.14.0
Update--- I found that the problem occurs when on the machine where the test runs some other application is open, iTerm or ActivityMonitor some alert, etc... quitting the applications the test works normally. If the safari window goes in the background the test fails, or rather the click is not released the item is not found
P.s The same tests are pass without any errors in Chrome, Firefox and Edge
Try executing javascript click event Try executing focus event Try checking for any overlapping elements Ensure all of the elements have loaded in before executing your selenium script.