You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using a custom application talking to the GeckoDriver through HTTP, so the client side log is not that relevant.
The program first finds the <html> tag of the main document and returns its ID (ending with 95e1 in the log below) for later comparison purposes.
Then it finds the ID for the <iframe> tag (...6d9e).
Then it tries to SwithToFrame using the <iframe> tag WebDriver ID (i.e. the same ...6d9e). It returns an OK code (as if the context was changed).
Then the <html> tag is found again. It should be the <html> of the iframe, i.e. a different ID. The assumed error that it finds again the main <html> tag and not the one in the iframe. This can be seen, that the second ID returned equals to the one before the ChangeToFrame. It is the assumed bug. Even if the SwitchToFrame could not be executed (e.g. wrong ID) then it should not return 200 OK.
In another run the same thing is done, but the ChangeFrameTo is done (step 3) using "id" with index 0. In this case it works as intended as it can also be seen in the log, returning a different ID for the <html>, this time from the iframe (...88c6).
Trace-level log
The error run
1691431487039 webdriver::server DEBUG -> POST /session/05ce34bc-23c6-426a-a61a-3c9edf3e72da/element {"using": "css selector", "value": "html"}
1691431487040 Marionette DEBUG 0 -> [0,7,"WebDriver:FindElement",{"using":"css selector","value":"html"}]
1691431487044 RemoteAgent TRACE WebDriverProcessData actor created for PID 84762
1691431487046 Marionette TRACE [11] MarionetteCommands actor created for window id 12884901889
1691431487054 Marionette DEBUG 0 <- [1,7,null,{"value":{"element-6066-11e4-a52e-4f735466cecf":"4c423f1b-e180-433d-8d91-e7dbd1ad95e1"}}]
1691431487054 webdriver::server DEBUG <- 200 OK {"value":{"element-6066-11e4-a52e-4f735466cecf":"4c423f1b-e180-433d-8d91-e7dbd1ad95e1"}}
1691431487095 webdriver::server DEBUG -> POST /session/05ce34bc-23c6-426a-a61a-3c9edf3e72da/element {"using": "css selector", "value": "iframe"}
1691431487097 Marionette DEBUG 0 -> [0,8,"WebDriver:FindElement",{"using":"css selector","value":"iframe"}]
1691431487099 Marionette DEBUG 0 <- [1,8,null,{"value":{"element-6066-11e4-a52e-4f735466cecf":"d128ee63-b2bc-4f2c-871a-bc3784aa6d9e"}}]
1691431487100 webdriver::server DEBUG <- 200 OK {"value":{"element-6066-11e4-a52e-4f735466cecf":"d128ee63-b2bc-4f2c-871a-bc3784aa6d9e"}}
I found the error. It was in my code. Instead of
{"element-6066-11e4-a52e-4f735466cecf": "d128ee63-b2bc-4f2c-871a-bc3784aa6d9e"}
{"id": {"element-6066-11e4-a52e-4f735466cecf": "d128ee63-b2bc-4f2c-871a-bc3784aa6d9e"}} should have been the payload of the Switch To Frame command. I am sorry for the false alarm.
It is strange though that no error message was given.
System
Testcase
File1:
File2 (called html2.html)
Stacktrace
I am using a custom application talking to the GeckoDriver through HTTP, so the client side log is not that relevant.
<html>
tag of the main document and returns its ID (ending with 95e1 in the log below) for later comparison purposes.<iframe>
tag (...6d9e).<iframe>
tag WebDriver ID (i.e. the same ...6d9e). It returns an OK code (as if the context was changed).<html>
tag is found again. It should be the<html>
of the iframe, i.e. a different ID. The assumed error that it finds again the main<html>
tag and not the one in the iframe. This can be seen, that the second ID returned equals to the one before the ChangeToFrame. It is the assumed bug. Even if the SwitchToFrame could not be executed (e.g. wrong ID) then it should not return 200 OK.In another run the same thing is done, but the ChangeFrameTo is done (step 3) using "id" with index 0. In this case it works as intended as it can also be seen in the log, returning a different ID for the
<html>
, this time from the iframe (...88c6).Trace-level log
The error run
1691431487039 webdriver::server DEBUG -> POST /session/05ce34bc-23c6-426a-a61a-3c9edf3e72da/element {"using": "css selector", "value": "html"}
1691431487040 Marionette DEBUG 0 -> [0,7,"WebDriver:FindElement",{"using":"css selector","value":"html"}]
1691431487044 RemoteAgent TRACE WebDriverProcessData actor created for PID 84762
1691431487046 Marionette TRACE [11] MarionetteCommands actor created for window id 12884901889
1691431487054 Marionette DEBUG 0 <- [1,7,null,{"value":{"element-6066-11e4-a52e-4f735466cecf":"4c423f1b-e180-433d-8d91-e7dbd1ad95e1"}}]
1691431487054 webdriver::server DEBUG <- 200 OK {"value":{"element-6066-11e4-a52e-4f735466cecf":"4c423f1b-e180-433d-8d91-e7dbd1ad95e1"}}
1691431487095 webdriver::server DEBUG -> POST /session/05ce34bc-23c6-426a-a61a-3c9edf3e72da/element {"using": "css selector", "value": "iframe"}
1691431487097 Marionette DEBUG 0 -> [0,8,"WebDriver:FindElement",{"using":"css selector","value":"iframe"}]
1691431487099 Marionette DEBUG 0 <- [1,8,null,{"value":{"element-6066-11e4-a52e-4f735466cecf":"d128ee63-b2bc-4f2c-871a-bc3784aa6d9e"}}]
1691431487100 webdriver::server DEBUG <- 200 OK {"value":{"element-6066-11e4-a52e-4f735466cecf":"d128ee63-b2bc-4f2c-871a-bc3784aa6d9e"}}
1691431487144 webdriver::server DEBUG -> POST /session/05ce34bc-23c6-426a-a61a-3c9edf3e72da/frame {"element-6066-11e4-a52e-4f735466cecf": "d128ee63-b2bc-4f2c-871a-bc3784aa6d9e"}
1691431487146 Marionette DEBUG 0 -> [0,9,"WebDriver:SwitchToFrame",{"id":null}]
1691431487149 Marionette DEBUG 0 <- [1,9,null,{"value":null}]
1691431487150 webdriver::server DEBUG <- 200 OK {"value":null}
1691431487196 webdriver::server DEBUG -> POST /session/05ce34bc-23c6-426a-a61a-3c9edf3e72da/element {"using": "css selector", "value": "html"}
1691431487198 Marionette DEBUG 0 -> [0,10,"WebDriver:FindElement",{"using":"css selector","value":"html"}]
1691431487203 Marionette DEBUG 0 <- [1,10,null,{"value":{"element-6066-11e4-a52e-4f735466cecf":"4c423f1b-e180-433d-8d91-e7dbd1ad95e1"}}]
1691431487205 webdriver::server DEBUG <- 200 OK {"value":{"element-6066-11e4-a52e-4f735466cecf":"4c423f1b-e180-433d-8d91-e7dbd1ad95e1"}}
The correct run (from the point it differs)
1691433924803 webdriver::server DEBUG -> POST /session/05ce34bc-23c6-426a-a61a-3c9edf3e72da/frame {"id": 0}
1691433924804 Marionette DEBUG 0 -> [0,14,"WebDriver:SwitchToFrame",{"id":0}]
1691433924806 Marionette DEBUG 0 <- [1,14,null,{"value":null}]
1691433924806 webdriver::server DEBUG <- 200 OK {"value":null}
1691433924848 webdriver::server DEBUG -> POST /session/05ce34bc-23c6-426a-a61a-3c9edf3e72da/element {"using": "css selector", "value": "html"}
1691433924849 Marionette DEBUG 0 -> [0,15,"WebDriver:FindElement",{"using":"css selector","value":"html"}]
1691433924851 Marionette TRACE [12884901889] MarionetteCommands actor created for window id 12884901891
1691433924853 Marionette DEBUG 0 <- [1,15,null,{"value":{"element-6066-11e4-a52e-4f735466cecf":"0101b99a-43d9-4ba0-9f64-b115d2a888c6"}}]
1691433924854 webdriver::server DEBUG <- 200 OK {"value":{"element-6066-11e4-a52e-4f735466cecf":"0101b99a-43d9-4ba0-9f64-b115d2a888c6"}}
The text was updated successfully, but these errors were encountered: