mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 05:10:49 +00:00
Bug 1321516 - Switch to WebDriver conformant interactability checks. r=ato
This change will cause Marionette to use the webdriver conformant clickElement method instead of the legacy one by default. It means that additional checks will be performed to ensure that the element to click onto is visible, and not obscured by other elements. Also it will be scrolled into view in case it is located outside of the current view port. Even it is used by default, the behavior can be controlled with the "moz:webdriverClick" capability. Setting to to 'false' when creating a new session, will cause a fallback to legacy clickElement. MozReview-Commit-ID: E560k62Q2J9 --HG-- extra : rebase_source : 1d4d120822c6ae13a319c6c5d33e5b77b86cfdb6
This commit is contained in:
parent
18c5223126
commit
7479ef0258
@ -68,13 +68,13 @@ class TestCapabilities(MarionetteTestCase):
|
||||
self.assertIn("moz:accessibilityChecks", self.caps)
|
||||
self.assertFalse(self.caps["moz:accessibilityChecks"])
|
||||
self.assertIn("moz:webdriverClick", self.caps)
|
||||
self.assertEqual(self.caps["moz:webdriverClick"], False)
|
||||
self.assertEqual(self.caps["moz:webdriverClick"], True)
|
||||
|
||||
def test_set_webdriver_click(self):
|
||||
def test_disable_webdriver_click(self):
|
||||
self.marionette.delete_session()
|
||||
self.marionette.start_session({"moz:webdriverClick": True})
|
||||
self.marionette.start_session({"moz:webdriverClick": False})
|
||||
caps = self.marionette.session_capabilities
|
||||
self.assertEqual(True, caps["moz:webdriverClick"])
|
||||
self.assertEqual(False, caps["moz:webdriverClick"])
|
||||
|
||||
def test_we_get_valid_uuid4_when_creating_a_session(self):
|
||||
self.assertNotIn("{", self.marionette.session_id,
|
||||
|
@ -366,7 +366,7 @@ session.Capabilities = class extends Map {
|
||||
["moz:headless", Cc["@mozilla.org/gfx/info;1"].getService(Ci.nsIGfxInfo).isHeadless],
|
||||
["moz:processID", Services.appinfo.processID],
|
||||
["moz:profile", maybeProfile()],
|
||||
["moz:webdriverClick", false],
|
||||
["moz:webdriverClick", true],
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -379,7 +379,7 @@ add_test(function test_Capabilities_ctor() {
|
||||
equal(false, caps.get("moz:accessibilityChecks"));
|
||||
ok(caps.has("moz:processID"));
|
||||
ok(caps.has("moz:profile"));
|
||||
equal(false, caps.get("moz:webdriverClick"));
|
||||
equal(true, caps.get("moz:webdriverClick"));
|
||||
|
||||
run_next_test();
|
||||
});
|
||||
@ -447,7 +447,7 @@ add_test(function test_Capabilities_fromJSON() {
|
||||
caps = fromJSON({timeouts: timeoutsConfig});
|
||||
equal(123, caps.get("timeouts").implicit);
|
||||
|
||||
equal(false, caps.get("moz:webdriverClick"));
|
||||
equal(true, caps.get("moz:webdriverClick"));
|
||||
caps = fromJSON({"moz:webdriverClick": true});
|
||||
equal(true, caps.get("moz:webdriverClick"));
|
||||
Assert.throws(() => fromJSON({"moz:webdriverClick": "foo"}));
|
||||
|
Loading…
x
Reference in New Issue
Block a user