Closed bigbang007jay closed 2 months ago
Could you please attach a trace-level log from geckodriver? You can strip it down to just include the error and some lines before to hide privacy related details. Also when you run the test please set the following Firefox preference: "remote.log.truncate"=false
to prevent truncation of log entries.
As it looks like in some circumstances the element that you want to click is not directly reachable. But it's hard to say given the amount of details so far.
Thanks.
The error is still truncated: Element <a href=\"https://..com/user/account_safe_center.htm\"> could not be scrolled into view
(see the 2 dots) which means that the firefox preference has not been correctly set.
@bigbang007jay as it looks like something went wrong with uploading the logs. The link just references this issue.
Great. That's indeed better and I can actually see the problem now. It's by surprise not the click on Message center list
which indeed raises a element not interactable
on purpose because it's not visible. The real problem is the click on Message center
:
1703485200208 webdriver::server DEBUG -> POST /session/db9f6acc-8d0a-416b-9ba9-3477eb7e20cd/element {"using": "xpath", "value": "//*[text()=\"Message Center\"]"}
1703485200208 Marionette DEBUG 0 -> [0,24,"WebDriver:FindElement",{"using":"xpath","value":"//*[text()=\"Message Center\"]"}]
1703485200209 Marionette TRACE [13] MarionetteCommands actor created for window id 6442450950
1703485200210 Marionette DEBUG 0 <- [1,24,null,{"value":{"element-6066-11e4-a52e-4f735466cecf":"5544281a-8067-40f2-ae38-e686f9cbc832"}}]
1703485200210 webdriver::server DEBUG <- 200 OK {"value":{"element-6066-11e4-a52e-4f735466cecf":"5544281a-8067-40f2-ae38-e686f9cbc832"}}
1703485200211 webdriver::server DEBUG -> POST /session/db9f6acc-8d0a-416b-9ba9-3477eb7e20cd/element/5544281a-8067-40f2-ae38-e686f9cbc832/click {"id": "5544281a-8067-40f2-ae38-e686f9cbc832"}
1703485200213 Marionette DEBUG 0 -> [0,25,"WebDriver:ElementClick",{"id":"5544281a-8067-40f2-ae38-e686f9cbc832"}]
1703485200716 Marionette WARN TimedPromise timed out after 500 ms: stacktrace:
TimedPromise/<@chrome://remote/content/marionette/sync.sys.mjs:219:24
TimedPromise@chrome://remote/content/marionette/sync.sys.mjs:203:10
interaction.flushEventLoop@chrome://remote/content/marionette/interaction.sys.mjs:466:10
webdriverClickElement@chrome://remote/content/marionette/interaction.sys.mjs:219:33
send@https://sitcmpucws.qme.com/scripts/jQuery/jquery-3.6.4.min.js:2:82989
ajax@https://sitcmpucws.qme.com/scripts/jQuery/jquery-3.6.4.min.js:2:78566
loginSuccessTouch@https://sitcmpucws.qme.com/index/default.htm?code=myspace:451:16
@https://sitcmpucws.qme.com/index/default.htm?code=myspace:419:13
e@https://sitcmpucws.qme.com/scripts/jQuery/jquery-3.6.4.min.js:2:30158
Deferred/then/l/</t<@https://sitcmpucws.qme.com/scripts/jQuery/jquery-3.6.4.min.js:2:30460
1703485200922 Marionette TRACE Canceled page load listener because no navigation has been detected
1703485200922 Marionette DEBUG 0 <- [1,25,null,{"value":null}]
Could it be that this link is running some JS to expend the menu? As seen above it at least doesn't trigger a navigation as it looks like. If that is the case your test potentially should wait until Message center list
is actually displayed before continuing with the click
on it. Without a HTML testcase I cannot say more here.
Closing as incomplete because of a missing reply from the reporter, but happy to reopen if more details are provided, which demonstrate that this is an issue with geckodriver or Firefox.
System
Testcase
Below is the code:
I'm using this to test Edge and Chrome and it works out everytime. However, when tesing on Firefox , sometimes it throw the exceptions as below:
Stacktrace
confest.py.pytesthook1 Test Failed: tests/test_cmp_myspace.py::TestCmpMySpace::test_green[user_login0-My Space/Security Setting/Security Center] Reason: ElementNotInteractableException, Message: Element could not be scrolled into view Stacktrace: RemoteError@chrome://remote/content/shared/RemoteError.sys.mjs:8:8 WebDriverError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:189:5 ElementNotInteractableError@chrome://remote/content/shared/webdriver/Errors.sys.mjs:349:5 webdriverClickElement@chrome://remote/content/marionette/interaction.sys.mjs:166:11 interaction.clickElement@chrome://remote/content/marionette/interaction.sys.mjs:135:11 clickElement@chrome://remote/content/marionette/actors/MarionetteCommandsChild.sys.mjs:202:29 receiveMessage@chrome://remote/content/marionette/actors/MarionetteCommandsChild.sys.mjs:84:31
test_cmp_myspace.py:56:
..\src\toolkit\common.py:59: in navigate_to_page ele.click() ..\venv\lib\site-packages\selenium\webdriver\remote\webelement.py:88: in click self._execute(Command.CLICK_ELEMENT) ..\venv\lib\site-packages\selenium\webdriver\remote\webelement.py:396: in _execute return self._parent.execute(command, params) ..\venv\lib\site-packages\selenium\webdriver\remote\webdriver.py:429: in execute self.error_handler.check_response(response)
self = <selenium.webdriver.remote.errorhandler.ErrorHandler object at 0x000001CC2F7F6A30> response = {'status': 400, 'value': '{"value":{"error":"element not interactable","message":"Element <a href=\"https://sitcmpucw...sys.mjs:202:29\\nreceiveMessage@chrome://remote/content/marionette/actors/MarionetteCommandsChild.sys.mjs:84:31\\n"}}'}
..\venv\lib\site-packages\selenium\webdriver\remote\errorhandler.py:243: ElementNotInteractableException
Please help check if something wrong? Thanks.