[Webkit-unassigned] [Bug 178580] New: WebDriver: silently ignores /session/:sid/moveto or /session/:sid/click command
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Oct 20 07:06:59 PDT 2017
https://bugs.webkit.org/show_bug.cgi?id=178580
Bug ID: 178580
Summary: WebDriver: silently ignores /session/:sid/moveto or
/session/:sid/click command
Product: WebKit
Version: Safari 11
Hardware: Macintosh
OS: macOS 10.12.4
Status: NEW
Severity: Normal
Priority: P2
Component: WebDriver
Assignee: webkit-unassigned at lists.webkit.org
Reporter: alex.borshik at portswigger.net
CC: bburg at apple.com
Created attachment 324393
--> https://bugs.webkit.org/attachment.cgi?id=324393&action=review
Example test script to reproduce
OVERVIEW:
==========================================================================================
Safari does not click on any elements in the page after issuing a moveto WebDriver command.
According to the documentation at https://developer.apple.com/library/content/documentation/NetworkingInternetWeb/Conceptual/WebDriverEndpointDoc/Commands/Commands.html both the moveto and click command should be supported.
EXPECTED BEHAVIOR: (running against chromedriver)
==========================================================================================
Alexs-Mac-Pro:~ alex$ ./test.py
POST /session {"desiredCapabilities": {"platform": "MAC", "browserName": "chrome"}}
200 OK
{"sessionId":"df9a615e6d6b97b92364bea11f17ea70","status":0,"value":{"acceptSslCerts":true,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"browserName":"chrome","chrome":{"chromedriverVersion":"2.29.461585 (0be2cd95f834e9ee7c46bcc7cf405b483f5ae83b)","userDataDir":"/var/folders/rb/0xqnrq0j7zx5yr9gvw1wklmc0000gn/T/.org.chromium.Chromium.MuPJje"},"cssSelectorsEnabled":true,"databaseEnabled":false,"handlesAlerts":true,"hasTouchScreen":false,"javascriptEnabled":true,"locationContextEnabled":true,"mobileEmulationEnabled":false,"nativeEvents":true,"networkConnectionEnabled":false,"pageLoadStrategy":"normal","platform":"Mac OS X","rotatable":false,"takesHeapSnapshot":true,"takesScreenshot":true,"unexpectedAlertBehaviour":"","version":"56.0.2924.87","webStorageEnabled":true}}
Opened Session df9a615e6d6b97b92364bea11f17ea70
Navigating to http://localhost:9999
POST /session/df9a615e6d6b97b92364bea11f17ea70/url {"url": "http://localhost:9999"}
200 OK
{"sessionId":"df9a615e6d6b97b92364bea11f17ea70","status":0,"value":null}
POST /session/df9a615e6d6b97b92364bea11f17ea70/element {"using": "id", "value": "in"}
200 OK
{"sessionId":"df9a615e6d6b97b92364bea11f17ea70","status":0,"value":{"ELEMENT":"0.07782628094021371-1"}}
POST /session/df9a615e6d6b97b92364bea11f17ea70/element {"using": "id", "value": "click_me"}
200 OK
{"sessionId":"df9a615e6d6b97b92364bea11f17ea70","status":0,"value":{"ELEMENT":"0.07782628094021371-2"}}
Filling in form
POST /session/df9a615e6d6b97b92364bea11f17ea70/moveto {"element": "0.07782628094021371-1"}
200 OK
{"sessionId":"df9a615e6d6b97b92364bea11f17ea70","status":0,"value":null}
POST /session/df9a615e6d6b97b92364bea11f17ea70/click {"button": 0}
200 OK
{"sessionId":"df9a615e6d6b97b92364bea11f17ea70","status":0,"value":null}
POST /session/df9a615e6d6b97b92364bea11f17ea70/keys {"value": ["howdy"]}
200 OK
{"sessionId":"df9a615e6d6b97b92364bea11f17ea70","status":0,"value":null}
POST /session/df9a615e6d6b97b92364bea11f17ea70/moveto {"element": "0.07782628094021371-2"}
200 OK
{"sessionId":"df9a615e6d6b97b92364bea11f17ea70","status":0,"value":null}
POST /session/df9a615e6d6b97b92364bea11f17ea70/click {"button": 0}
200 OK
{"sessionId":"df9a615e6d6b97b92364bea11f17ea70","status":0,"value":null}
GET /session/df9a615e6d6b97b92364bea11f17ea70/alert_text None
200 OK
{"sessionId":"df9a615e6d6b97b92364bea11f17ea70","status":0,"value":"howdy"}
{u'status': 0, u'sessionId': u'df9a615e6d6b97b92364bea11f17ea70', u'value': u'howdy'}
POST /session/df9a615e6d6b97b92364bea11f17ea70/accept_alert {}
200 OK
{"sessionId":"df9a615e6d6b97b92364bea11f17ea70","status":0,"value":null}
Closing Session
DELETE /session/df9a615e6d6b97b92364bea11f17ea70/window None
200 OK
{"sessionId":"df9a615e6d6b97b92364bea11f17ea70","status":0,"value":null}
ACTUAL BEHAVIOR:
==========================================================================================
Alexs-Mac-Pro:~ alex$ ./test.py
POST /session {"desiredCapabilities": {"platform": "MAC", "browserName": "safari"}}
200 OK
{"status":0,"sessionId":"F52004C0-337B-4C3E-9E0E-A8BFD6A8025B","value":{"version":"12604.1.38.1.7","rotatable":false,"applicationCacheEnabled":true,"databaseEnabled":true,"handlesAlerts":true,"cleanSession":true,"browserName":"safari","javascriptEnabled":true,"locationContextEnabled":false,"platform":"macOS","webStorageEnabled":true,"cssSelectorsEnabled":true,"nativeEvents":true,"platformName":"macOS"}}
Opened Session F52004C0-337B-4C3E-9E0E-A8BFD6A8025B
Navigating to http://localhost:9999
POST /session/F52004C0-337B-4C3E-9E0E-A8BFD6A8025B/url {"url": "http://localhost:9999"}
200 OK
{"status":0,"sessionId":"F52004C0-337B-4C3E-9E0E-A8BFD6A8025B","value":{}}
POST /session/F52004C0-337B-4C3E-9E0E-A8BFD6A8025B/element {"using": "id", "value": "in"}
200 OK
{"status":0,"sessionId":"F52004C0-337B-4C3E-9E0E-A8BFD6A8025B","value":{"ELEMENT":"node-275F1FD7-CFF0-4AEF-AD9E-DBE468885822"}}
POST /session/F52004C0-337B-4C3E-9E0E-A8BFD6A8025B/element {"using": "id", "value": "click_me"}
200 OK
{"status":0,"sessionId":"F52004C0-337B-4C3E-9E0E-A8BFD6A8025B","value":{"ELEMENT":"node-B3C803F4-2604-40EF-81C4-8E52DB09E365"}}
Filling in form
POST /session/F52004C0-337B-4C3E-9E0E-A8BFD6A8025B/moveto {"element": "node-275F1FD7-CFF0-4AEF-AD9E-DBE468885822"}
200 OK
{"status":0,"sessionId":"F52004C0-337B-4C3E-9E0E-A8BFD6A8025B","value":{}}
POST /session/F52004C0-337B-4C3E-9E0E-A8BFD6A8025B/click {"button": 0}
200 OK
{"status":0,"sessionId":"F52004C0-337B-4C3E-9E0E-A8BFD6A8025B","value":{}}
POST /session/F52004C0-337B-4C3E-9E0E-A8BFD6A8025B/keys {"value": ["howdy"]}
200 OK
{"status":0,"sessionId":"F52004C0-337B-4C3E-9E0E-A8BFD6A8025B","value":{}}
POST /session/F52004C0-337B-4C3E-9E0E-A8BFD6A8025B/moveto {"element": "node-B3C803F4-2604-40EF-81C4-8E52DB09E365"}
200 OK
{"status":0,"sessionId":"F52004C0-337B-4C3E-9E0E-A8BFD6A8025B","value":{}}
POST /session/F52004C0-337B-4C3E-9E0E-A8BFD6A8025B/click {"button": 0}
200 OK
{"status":0,"sessionId":"F52004C0-337B-4C3E-9E0E-A8BFD6A8025B","value":{}}
GET /session/F52004C0-337B-4C3E-9E0E-A8BFD6A8025B/alert_text None
500 Internal Server Error
{"status":27,"sessionId":"F52004C0-337B-4C3E-9E0E-A8BFD6A8025B","value":{"message":"An attempt was made to operate on a modal dialog when one was not open."}}
{u'status': 27, u'sessionId': u'F52004C0-337B-4C3E-9E0E-A8BFD6A8025B', u'value': {u'message': u'An attempt was made to operate on a modal dialog when one was not open.'}}
POST /session/F52004C0-337B-4C3E-9E0E-A8BFD6A8025B/accept_alert {}
500 Internal Server Error
{"status":27,"sessionId":"F52004C0-337B-4C3E-9E0E-A8BFD6A8025B","value":{"message":"An attempt was made to operate on a modal dialog when one was not open."}}
Closing Session
DELETE /session/F52004C0-337B-4C3E-9E0E-A8BFD6A8025B/window None
200 OK
{"status":0,"sessionId":"F52004C0-337B-4C3E-9E0E-A8BFD6A8025B","value":{}}
STEPS TO REPRODUCE:
==========================================================================================
1) start safari driver
safaridriver -p 9515
2) serve example html page from somehwere:
<html><head><title>WebDriver test</title></head><body><label for="in">Input</label><input type="text" id="in"/><button id="click_me" onclick="alert(document.getElementById('in').value)">Click Me</button></body></html>
3) run the attached test.py script to issue the webdriver commands that do not behave as expected.
PLATFORM DETAILS:
==========================================================================================
System Software Overview:
System Version: macOS 10.12.6 (16G29)
Kernel Version: Darwin 16.7.0
Safari:
Version: 11.0
Obtained from: Apple
Last Modified: 25/09/2017, 13:56
Kind: Intel
64-Bit (Intel): Yes
Signed by: Software Signing, Apple Code Signing Certification Authority, Apple Root CA
Location: /Applications/Safari.app
Get Info String: 11.0, Copyright © 2003-2017 Apple Inc.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20171020/4d2a10d1/attachment-0001.html>
More information about the webkit-unassigned
mailing list