Bug 1425947 - Expose session capabilities in 'new_session' fixture. draft
authorHenrik Skupin <mail@hskupin.info>
Tue, 19 Dec 2017 13:05:47 +0100
changeset 713001 6492e332186b2dcddb3443ba61b577015889553e
parent 713000 6f5d6b45406c1cf404fee5fa75da600ae484a2cf
child 744223 becf9f52ef40b2b816188ee68ddad8b851471f8c
push id93523
push userbmo:hskupin@gmail.com
push dateTue, 19 Dec 2017 12:14:27 +0000
bugs1425947
milestone59.0a1
Bug 1425947 - Expose session capabilities in 'new_session' fixture. The 'new_session' fixture missed to expose the capabilities of the newly created session to the test. MozReview-Commit-ID: 6qYvoIY7AZV
testing/web-platform/tests/webdriver/tests/support/fixtures.py
--- a/testing/web-platform/tests/webdriver/tests/support/fixtures.py
+++ b/testing/web-platform/tests/webdriver/tests/support/fixtures.py
@@ -208,16 +208,17 @@ def new_session(configuration, request):
         global _current_session
         _session = webdriver.Session(configuration["host"],
                                      configuration["port"],
                                      capabilities=None)
         value = _session.send_command("POST", "session", body=body)
         # Don't set the global session until we are sure this succeeded
         _current_session = _session
         _session.session_id = value["sessionId"]
+        _session.capabilities = value["capabilities"]
 
         return value, _current_session
 
     end()
 
     # finalisers are popped off a stack, making their ordering reverse
     request.addfinalizer(end)
     request.addfinalizer(_switch_to_top_level_browsing_context)