Open Bug 1569100 Opened 2 months ago Updated 12 days ago

Add support for more WebDriver Command and Parameter types in Marionette crate

Categories

(Testing :: geckodriver, enhancement, P2)

Version 3
enhancement

Tracking

(Not tracked)

People

(Reporter: nupurbaghel, Assigned: ato)

References

(Blocks 1 open bug)

Details

(Keywords: leave-open)

Attachments

(25 files, 1 obsolete file)

47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review

Bug 1565210 introduced the use of WebDriver:FindElement and WebDriver:GetTimeouts (from Marionette crate) in geckodriver. We now need to add support for other WebDriver Command and Parameter types in Marionette crate. And further use each of these in geckodriver.

Assignee: nobody → nupurbaghel
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P1
Pushed by atolfsen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/be310b9aa0a6
Add FindElements command and WebElements response types to Marionette. r=ato
Keywords: leave-open

Both WebElement and Timeouts objects are used by the request and response stages.
Hence moving them to the common module.

Pushed by atolfsen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/45a8ea98e8fc
Marionette crate: move WebElement and Timeouts objects to common module. r=ato

Andreas, why does this bug need to stay open?

Flags: needinfo?(ato)

Nupur is going to push more patches to this bug.

Flags: needinfo?(ato)
Pushed by atolfsen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/571761c0b3b9
Add SetTimeouts command to Marionette. r=ato

Backed out for web platform failures on set_timeouts/set.py

backout: https://hg.mozilla.org/integration/autoland/rev/1e79f1d7355836952bdc69a994547007c18e3a93

push: https://treeherder.mozilla.org/#/jobs?repo=autoland&group_state=expanded&searchStr=web-platform-tests-wdspec-&revision=571761c0b3b93c63ce6944582d88d7184394a85d

failure log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=258791756&repo=autoland&lineNumber=89269

[task 2019-07-29T13:38:11.983Z] 13:38:11 INFO - TEST-PASS | /webdriver/tests/set_timeouts/set.py | test_value_positive_integer[9007199254740992-script]
[task 2019-07-29T13:38:11.984Z] 13:38:11 INFO - TEST-PASS | /webdriver/tests/set_timeouts/set.py | test_set_all_fields
[task 2019-07-29T13:38:11.984Z] 13:38:11 INFO - TEST-UNEXPECTED-FAIL | /webdriver/tests/set_timeouts/set.py | test_script_value_null - assert 30000 is None
[task 2019-07-29T13:38:11.984Z] 13:38:11 INFO - session = <Session 03674300-e02a-274c-8c02-b845aa358088>
[task 2019-07-29T13:38:11.984Z] 13:38:11 INFO -
[task 2019-07-29T13:38:11.984Z] 13:38:11 INFO - def test_script_value_null(session):
[task 2019-07-29T13:38:11.984Z] 13:38:11 INFO - response = set_timeouts(session, {"script": None})
[task 2019-07-29T13:38:11.984Z] 13:38:11 INFO - assert_success(response)
[task 2019-07-29T13:38:11.984Z] 13:38:11 INFO -
[task 2019-07-29T13:38:11.984Z] 13:38:11 INFO - > assert session.timeouts.script is None
[task 2019-07-29T13:38:11.984Z] 13:38:11 INFO - E assert 30000 is None
[task 2019-07-29T13:38:11.984Z] 13:38:11 INFO - E + where 30000 = <webdriver.client.Timeouts object at 0x1052f12d0>.script
[task 2019-07-29T13:38:11.984Z] 13:38:11 INFO - E + where <webdriver.client.Timeouts object at 0x1052f12d0> = <Session 03674300-e02a-274c-8c02-b845aa358088>.timeouts
[task 2019-07-29T13:38:11.984Z] 13:38:11 INFO -
[task 2019-07-29T13:38:11.984Z] 13:38:11 INFO - response = <Responsetatus=200 body={"value": null}>
[task 2019-07-29T13:38:11.984Z] 13:38:11 INFO - session = <Session 03674300-e02a-274c-8c02-b845aa358088>
[task 2019-07-29T13:38:11.984Z] 13:38:11 INFO -
[task 2019-07-29T13:38:11.984Z] 13:38:11 INFO - tests/web-platform/tests/webdriver/tests/set_timeouts/set.py:95: AssertionError
[task 2019-07-29T13:38:11.984Z] 13:38:11 INFO - TEST-OK | /webdriver/tests/set_timeouts/set.py | took 5719ms

Flags: needinfo?(nupurbaghel)

Updated the patch. Script is now successfully serialized to Null values also. This should fix the test.

Flags: needinfo?(nupurbaghel)
Pushed by atolfsen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a4a6bfabe3c3
Add SetTimeouts command to Marionette. r=ato
https://hg.mozilla.org/integration/autoland/rev/15871237b7d5
Add Cookie, Date types and AddCookie command to Marionette. r=ato
https://hg.mozilla.org/integration/autoland/rev/afcc47871261
Add GetCookies command and Cookies response types. r=ato

Since GetNamedCookie is currently not supported by the marionette server, the corresponding WebDriver command is converted to GetCookies command.

Pushed by atolfsen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4e722cd1cb79
Marionette: Add DeleteCookie, DeleteCookies commands & Geckodriver: GetNamedCookie converted to GetCookies. r=ato
https://hg.mozilla.org/integration/autoland/rev/a754c63e321c
Add NewWindow command and NewWindow response types to Marionette crate. r=ato
Pushed by atolfsen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5fdbf8fca123
Marionette: Add CloseWindow, FullscreenWindow, MaximiseWindow, MinimiseWindow commands and WindowRect type. r=ato

Apart from adding all the new types, also fixed some marionette tests for webelements which was incorrectly deserialized.

Pushed by atolfsen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/88e7f43aa21d
Marionette: Add GetWindowHandle, GetWindowHandles, GetWindowRect, SetWindowRect commands and WindowRect type for request. r=ato
Pushed by atolfsen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9334976aea6a
Marionette: Add AcceptAlert, DismissAlert, GetAlertText and SendAlertText commands. r=ato
Pushed by atolfsen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/84fe377bc84f
Marionette: Add ExecuteScript, ExecuteAsyncScript commands and Script type. r=ato

On applying D40816, autoland reports:

applying /tmp/tmpk6g1_6 1 out of 1 hunk ignored -- saving rejects to file testing/geckodriver/marionette/src/webdriver.rs.rej abort: patch command failed: exited with status 256 
Pushed by atolfsen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/58a6f21cdcd8
Marionette: Fix deserialization of value-wrapped MarionetteResult types. r=ato
https://hg.mozilla.org/integration/autoland/rev/4e4a24f41d7f
Marionette: Add GetElementAttribute and GetElementProperty commands. r=ato
https://hg.mozilla.org/integration/autoland/rev/7c1fd3cac6dc
Marionette: Add GetActiveElement, GetElementRect, GetElementTagName and GetElementText commands. r=ato
https://hg.mozilla.org/integration/autoland/rev/3697bcc282df
Marionette: Add IsDisplayed, IsEnabled and IsSelected commands and Bool response type. r=ato
Attachment #9082362 - Attachment is obsolete: true
Pushed by atolfsen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ae70794d4b51
Marionette: Add DeleteSession command. r=ato
Pushed by atolfsen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/84c3dbb41e47
Marionette: Add ElementClear, ElementClick, GoBack and GoForward commands. r=ato
https://hg.mozilla.org/integration/autoland/rev/5dc6a1b9d6c5
Marionette: Add FindElementElement and FindElementElements commands. r=ato

Depends on D41499

Depends on D41530

Attachment #9084613 - Attachment description: Bug 1569100 - Marionette: Add SwitchToFrame command and SwitchToFrame, FrameId types. r=ato → Bug 1569100 - Marionette: Add SwitchToFrame command and SwitchToFrame, Frame types. r=ato
Pushed by atolfsen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4aad0d4dca1f
Marionette: Add Get(i.e. Navigate), GetCurrentUrl, GetPageSource and GetTitle commands. r=ato
https://hg.mozilla.org/integration/autoland/rev/23747eab418f
Marionette: Add GetCSSValue command. r=ato
https://hg.mozilla.org/integration/autoland/rev/294303d325ca
Marionette: Add Refresh, ReleaseActions and SwitchToParentFrame commands. r=ato
https://hg.mozilla.org/integration/autoland/rev/c7cc3d8738e6
Marionette: Add SwitchToFrame command and SwitchToFrame, Frame types. r=ato
https://hg.mozilla.org/integration/autoland/rev/af9451f15665
Marionette: Add SwitchToWindow command and SwitchToWindow type. r=ato
https://hg.mozilla.org/integration/autoland/rev/347d252902b9
Add TakeElementScreenshot, TakeScreenshot and TakeFullScreenshot commands. r=ato
https://hg.mozilla.org/integration/autoland/rev/c9853685124c
Marionette: Add ElementSendKeys command. r=ato
Backout by aciure@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/58c2f8a1f337
Backed out 7 changesets for causing close_window/close.py, accept_alert/accept.py perma failures CLOSED TREE
Flags: needinfo?(nupurbaghel)

I will pick up the remaining work to land the seven last patches.

Assignee: nupurbaghel → ato
Blocks: 1493095
Status: ASSIGNED → NEW
Flags: needinfo?(nupurbaghel)
Priority: P1 → P2
You need to log in before you can comment on or make changes to this bug.