Closed
Bug 1396883
Opened 7 years ago
Closed 7 years ago
Invalid capability json data doesn't throw an exception
Categories
(Testing :: geckodriver, enhancement)
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: whimboo, Unassigned)
Details
Examples like the following do not raise an exception even with those fields not existent anymore:
> curl -d '{"desiredCapabilities": {}, "requiredCapabilities": {}}' http://localhost:4444/session
Andreas, should we block 0.19 for that?
Flags: needinfo?
Reporter | ||
Updated•7 years ago
|
Flags: needinfo? → needinfo?(ato)
Comment 1•7 years ago
|
||
I can’t reproduce this bug:
> % ./mach geckodriver -vv &
> [1] 10553
> % 0:00.27 /home/ato/src/gecko/obj-x86_64-pc-linux-gnu/dist/bin/geckodriver -vv --binary /home/ato/src/gecko/obj-x86_64-pc-linux-gnu/dist/bin/firefox
> 1504699862171 geckodriver INFO geckodriver 0.18.0 (c959327c6b75cd4930a6ea087583c38b805e7524 2017-09-06)
> 1504699862171 webdriver::httpapi DEBUG Creating routes
> 1504699862177 geckodriver INFO Listening on 127.0.0.1:4444
>
> % curl -d '{"desiredCapabilities": {}, "requiredCapabilities": {}}' http://localhost:4444/session
> 1504699866362 webdriver::server DEBUG -> POST /session {"desiredCapabilities": {}, "requiredCapabilities": {}}
> 1504699867123 geckodriver::marionette INFO Starting browser /home/ato/src/gecko/obj-x86_64-pc-linux-gnu/dist/bin/firefox with args ["-marionette"]
> 1504699867127 geckodriver::marionette TRACE connection attempt 0/600
> 1504699867228 geckodriver::marionette TRACE connection attempt 1/600
> 1504699867328 geckodriver::marionette TRACE connection attempt 2/600
> 1504699867428 geckodriver::marionette TRACE connection attempt 3/600
> 1504699867528 geckodriver::marionette TRACE connection attempt 4/600
> 1504699867615 Marionette DEBUG Received observer notification "profile-after-change"
> 1504699867629 geckodriver::marionette TRACE connection attempt 5/600
> 1504699867667 Marionette DEBUG Received observer notification "command-line-startup"
> 1504699867668 Marionette INFO Enabled via --marionette
> 1504699867729 geckodriver::marionette TRACE connection attempt 6/600
> 1504699867829 geckodriver::marionette TRACE connection attempt 7/600
> 1504699867930 geckodriver::marionette TRACE connection attempt 8/600
> 1504699868030 geckodriver::marionette TRACE connection attempt 9/600
> 1504699868130 geckodriver::marionette TRACE connection attempt 10/600
> 1504699868231 geckodriver::marionette TRACE connection attempt 11/600
> 1504699868331 geckodriver::marionette TRACE connection attempt 12/600
> 1504699868431 geckodriver::marionette TRACE connection attempt 13/600
> 1504699868532 geckodriver::marionette TRACE connection attempt 14/600
> 1504699868632 geckodriver::marionette TRACE connection attempt 15/600
> 1504699868733 geckodriver::marionette TRACE connection attempt 16/600
> 1504699868833 geckodriver::marionette TRACE connection attempt 17/600
> 1504699868834 Marionette DEBUG Received observer notification "sessionstore-windows-restored"
> 1504699868933 geckodriver::marionette TRACE connection attempt 18/600
> 1504699869034 geckodriver::marionette TRACE connection attempt 19/600
> 1504699869134 geckodriver::marionette TRACE connection attempt 20/600
> 1504699869234 geckodriver::marionette TRACE connection attempt 21/600
> 1504699869335 geckodriver::marionette TRACE connection attempt 22/600
> 1504699869435 geckodriver::marionette TRACE connection attempt 23/600
> 1504699869463 Marionette DEBUG Setting recommended pref toolkit.cosmeticAnimations.enabled to false
> 1504699869463 Marionette DEBUG Setting recommended pref datareporting.policy.dataSubmissionPolicyAccepted to false
> 1504699869464 Marionette INFO Listening on port 35321
> 1504699869535 geckodriver::marionette DEBUG Connected to Marionette on localhost:35321
> 1504699869538 Marionette DEBUG Accepted connection 0 from 127.0.0.1:36624
> 1504699869540 geckodriver::marionette TRACE <- {"applicationType":"gecko","marionetteProtocol":3}
> 1504699869540 geckodriver::marionette TRACE -> 62:[0,1,"newSession",{"capabilities":{"desiredCapabilities":{}}}]
> 1504699869543 Marionette TRACE 0 -> [0,1,"newSession",{"capabilities":{"desiredCapabilities":{}}}]
> 1504699869610 Marionette DEBUG Register listener.js for window 2147483649
> 1504699869628 Marionette TRACE 0 <- [1,1,null,{"sessionId":"b7df8225-7f95-4bf6-9965-d8a2da787baf","capabilities":{"browserName":"firefox","browserVersion":"57.0a1","platformName":"linux","platformVersion":"4.9.0-3-amd64","pageLoadStrategy":"normal","acceptInsecureCerts":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"rotatable":false,"specificationLevel":0,"moz:processID":10609,"moz:profile":"/tmp/rust_mozprofile.sV6LwcugL0zb","moz:accessibilityChecks":false,"moz:headless":false}}]
> 1504699869632 geckodriver::marionette TRACE <- [1,1,null,{"sessionId":"b7df8225-7f95-4bf6-9965-d8a2da787baf","capabilities":{"browserName":"firefox","browserVersion":"57.0a1","platformName":"linux","platformVersion":"4.9.0-3-amd64","pageLoadStrategy":"normal","acceptInsecureCerts":false,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000},"rotatable":false,"specificationLevel":0,"moz:processID":10609,"moz:profile":"/tmp/rust_mozprofile.sV6LwcugL0zb","moz:accessibilityChecks":false,"moz:headless":false}}]
> 1504699869632 webdriver::server DEBUG <- 200 OK {"value": {"sessionId":"b7df8225-7f95-4bf6-9965-d8a2da787baf","capabilities":{"acceptInsecureCerts":false,"browserName":"firefox","browserVersion":"57.0a1","moz:accessibilityChecks":false,"moz:headless":false,"moz:processID":10609,"moz:profile":"/tmp/rust_mozprofile.sV6LwcugL0zb","pageLoadStrategy":"normal","platformName":"linux","platformVersion":"4.9.0-3-amd64","rotatable":false,"specificationLevel":0,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000}}}}
> {"value": {"sessionId":"b7df8225-7f95-4bf6-9965-d8a2da787baf","capabilities":{"acceptInsecureCerts":false,"browserName":"firefox","browserVersion":"57.0a1","moz:accessibilityChecks":false,"moz:headless":false,"moz:processID":10609,"moz:profile":"/tmp/rust_mozprofile.sV6LwcugL0zb","pageLoadStrategy":"normal","platformName":"linux","platformVersion":"4.9.0-3-amd64","rotatable":false,"specificationLevel":0,"timeouts":{"implicit":0,"pageLoad":300000,"script":30000}}}}%
Flags: needinfo?(ato)
Reporter | ||
Comment 2•7 years ago
|
||
I talked with Andreas on IRC and indeed we have to keep supporting desiredCapabilities and requiredCapabilities because it's that what is used by Selenium clients, and supported by all other drivers.
Also the following JSON body is valid, because we have to ignore everything at the top-level, and only care about what's inside of the `capabilities` key.
> curl -d '{"pageLoadStrategy": "eager"}' http://localhost:4444/session
All that makes this bug invalid.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•