Summary: | Unable to Click on Safari 13 | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Kushang <g.kushang> | ||||
Component: | WebDriver | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Major | CC: | alex.anich, arian.ics, astrawxy, bburg, boaz, cparmar.mail, david.arrowsmith, david.kreutz, duncan.ariey, gerald.ehmayer, hai.le, jeremy.cattau, jimmy.collazos, jonlee, kolesar.mihal, kristinf, liam.page, marmenez, matthew-renshaw, milen.yordanov, natalie.mona, philip, ralopez, ron, shrimeister, slava.charodey, vikrant.lakshya, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | Other | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Kushang
2019-10-04 10:36:36 PDT
(In reply to Kushang from comment #0) > Selenium tests are broken with the Safari 13 release. Webdriver/SafariDriver > is Unable to click on buttons on the page. Please include more details, such as your system, version of Selenium, and what tests are failing. The click action seems to be performed, but nothing happens. My logs show that the element (which is a link) is clicked, but the redirection of page does not occurs. Selenium version: 3.141.59 Safari version: both 13.0.1 and STP 93 The click issue still occurs with Safari 13.0.2 on latest macOS 10.15 release. Can be reproduced with this Java snippet: driver.get("https://the-internet.herokuapp.com/add_remove_elements/"); assert driver.findElementsByCssSelector(".added-manually").size() == 0; WebElement button = driver.findElementByCssSelector(".example > button:nth-child(1)"); button.click(); // issue: nothing happens assert driver.findElementsByCssSelector(".added-manually").size() == 1; In my testing, it clicks at an offset from where it should be clicking... It clicks slightly below where it is meant to click, so in our case it ends up clicking the button below the one we wanted... I think that these two issues are related: https://bugs.webkit.org/show_bug.cgi?id=202802 A common thread between the broken buttons is an :active psuedo class. Same issue for me. When is this likely to be fixed? Thanks Issue still persists in latest Safari Technology preview. When will this be fixed? Are we expected to not bother testing on Safari 13 any more? I can imagine this will lead to a lot of buggy applications in Safari 13 if nobody can do automated testing with it... This bug is being actively investigated. (In reply to alex.anich from comment #7) > I think that these two issues are related: > > https://bugs.webkit.org/show_bug.cgi?id=202802 > > A common thread between the broken buttons is an :active psuedo class. I don't think they are related. This bug is about a regression in safaridriver and its WebKit parts. I am still facing this issue with STP 93. Please fix it. Thanks. (In reply to Vikrant Kumar Chauhan from comment #13) > I am still facing this issue with STP 93. Please fix it. > > Thanks. Same here, reproduced issue on STP 95. I am experiencing the same problem with Safari version 13.0.3 (15608.3.10.1.4). The page I load has a clickable button. I am using Python + Selenium + latest Safaridriver. The element is discovered but when I issue a .click() command, nothing happens. The same works fine on FireFox and Chrome. Also, running document.getElementById('element_id').click() on the javaScript console, works. Can someone let know if there is any progress with this issue? Thanks Preventing me from running Selenium tests on Safari. Works fine on Chrome, Firefox and (on another machine) Safari 12. Mac Mini A1993 OSX 10.14.6 Safari 13.0.3 14608.3.10.10.1 Selenium 3.141.59 Adding my comment in here as experiencing the same thing. I picked an unfortunate time to configure our automated test suite to run in safari for the first time; I'm also encountering this issue. - C# Selenium bindings (v3.141.0) - Safari (13.0.3) We expect this issue to be fixed in Safari Technology Preview 96. Hi, I am also facing an issue with click action when using xpath and I think it is similar to this one. Using XPATH to click on element, clicks somewhere else instead of given element. However; if I use id of that element, then it works fine. I have to use xpath instead of id as the id is generated dynamically. driver.findElement(By.xpath("//img[@id=’Add’]").click(); - Not working, click on top or below of element driver.findElement(By.id(“a0214”).click(); - Working, click on proper element Is this similar to this? If not, can you please suggest what I am missing here? Thanks, Chandresh Parmar I have the same problem, but in my case is when the element is in shadow-dom Idea: ======= The element exist; but the service can't find and then execute "Window.getComputedStyle" with null, undefined or similar Safaridrier Version: ==================== "included with Safari 13.0.3 (14608.3.10.10.1)" Reproduce Requests: =================== [POST] http://127.0.0.1:4444/session/08D37203-AEDD-43DF-990A-900EC182648A/element -> DATA { using: 'css selector', value: 'shop-app' } -> RESULT { 'element-6066-11e4-a52e-4f735466cecf': 'node-D5A74127-717A-4BFB-8E13-1AE3A6D96A5C' } [POST] http://127.0.0.1:4444/session/08D37203-AEDD-43DF-990A-900EC182648A/execute/sync -> DATA { script: 'return (function (elem) {return (function() {if (this.shadowRoot) {return this.shadowRoot.querySelector(\'shop-home\')}return this.querySelector(\'shop-home\')}).call(elem);}).apply(null, arguments)', args: [ { 'element-6066-11e4-a52e-4f735466cecf': 'node-D5A74127-717A-4BFB-8E13-1AE3A6D96A5C', ELEMENT: 'node-D5A74127-717A-4BFB-8E13-1AE3A6D96A5C' } ] } -> RESULT { 'element-6066-11e4-a52e-4f735466cecf': 'node-5D1721C6-39B1-425E-8751-2DF193491171' } [POST] http://127.0.0.1:4444/session/08D37203-AEDD-43DF-990A-900EC182648A/element/node-5D1721C6-39B1-425E-8751-2DF193491171/click ->ERROR-RESULT: A JavaScript exception occured: Argument 1 ('element') to Window.getComputedStyle must be an instance of Element This issue still reproduces on Safari Technology Preview (STP) release 96. Created attachment 384186 [details]
Issue Reproducible
STILL REPRODUCIBLE with STP 96.
I've tested this issue with STP 96 and found it as still reproducible.
We also tested it and can still reproduce it in STP 96... So it looks like it has not been fixed. I have also reproduced the bug in STP 96. (In reply to Jimmy Collazos from comment #21) > I have the same problem, but in my case is when the element is in shadow-dom > > Idea: > ======= > The element exist; but the service can't find and then execute > "Window.getComputedStyle" with null, undefined or similar > > > Safaridrier Version: > ==================== > "included with Safari 13.0.3 (14608.3.10.10.1)" > > > Reproduce Requests: > =================== > [POST] > http://127.0.0.1:4444/session/08D37203-AEDD-43DF-990A-900EC182648A/element > -> DATA { using: 'css selector', value: 'shop-app' } > -> RESULT { 'element-6066-11e4-a52e-4f735466cecf': > 'node-D5A74127-717A-4BFB-8E13-1AE3A6D96A5C' } > > [POST] > http://127.0.0.1:4444/session/08D37203-AEDD-43DF-990A-900EC182648A/execute/ > sync > -> DATA { > script: 'return (function (elem) {return (function() {if (this.shadowRoot) > {return this.shadowRoot.querySelector(\'shop-home\')}return > this.querySelector(\'shop-home\')}).call(elem);}).apply(null, arguments)', > args: [ { 'element-6066-11e4-a52e-4f735466cecf': > 'node-D5A74127-717A-4BFB-8E13-1AE3A6D96A5C', ELEMENT: > 'node-D5A74127-717A-4BFB-8E13-1AE3A6D96A5C' } ] > } > -> RESULT { 'element-6066-11e4-a52e-4f735466cecf': > 'node-5D1721C6-39B1-425E-8751-2DF193491171' } > > [POST] > http://127.0.0.1:4444/session/08D37203-AEDD-43DF-990A-900EC182648A/element/ > node-5D1721C6-39B1-425E-8751-2DF193491171/click > ->ERROR-RESULT: A JavaScript exception occured: Argument 1 ('element') to > Window.getComputedStyle must be an instance of Element I am also running into this issue calling click or clear on an element inside shadowdom. http://127.0.0.1:4444/wd/hub/session/3957A8DD-87E9-47FA-BBA1-5F3FE9AB511C/element/node-D45B7A71-2F93-49D6-98AD-9821E0A0BCCC/clear Resp: Argument 1 ('element') to Window.getComputedStyle must be an instance of Element (In reply to arian.ics from comment #26) > (In reply to Jimmy Collazos from comment #21) > > I have the same problem, but in my case is when the element is in shadow-dom > > > > Idea: > > ======= > > The element exist; but the service can't find and then execute > > "Window.getComputedStyle" with null, undefined or similar > > > > > > Safaridrier Version: > > ==================== > > "included with Safari 13.0.3 (14608.3.10.10.1)" > > > > > > Reproduce Requests: > > =================== > > [POST] > > http://127.0.0.1:4444/session/08D37203-AEDD-43DF-990A-900EC182648A/element > > -> DATA { using: 'css selector', value: 'shop-app' } > > -> RESULT { 'element-6066-11e4-a52e-4f735466cecf': > > 'node-D5A74127-717A-4BFB-8E13-1AE3A6D96A5C' } > > > > [POST] > > http://127.0.0.1:4444/session/08D37203-AEDD-43DF-990A-900EC182648A/execute/ > > sync > > -> DATA { > > script: 'return (function (elem) {return (function() {if (this.shadowRoot) > > {return this.shadowRoot.querySelector(\'shop-home\')}return > > this.querySelector(\'shop-home\')}).call(elem);}).apply(null, arguments)', > > args: [ { 'element-6066-11e4-a52e-4f735466cecf': > > 'node-D5A74127-717A-4BFB-8E13-1AE3A6D96A5C', ELEMENT: > > 'node-D5A74127-717A-4BFB-8E13-1AE3A6D96A5C' } ] > > } > > -> RESULT { 'element-6066-11e4-a52e-4f735466cecf': > > 'node-5D1721C6-39B1-425E-8751-2DF193491171' } > > > > [POST] > > http://127.0.0.1:4444/session/08D37203-AEDD-43DF-990A-900EC182648A/element/ > > node-5D1721C6-39B1-425E-8751-2DF193491171/click > > ->ERROR-RESULT: A JavaScript exception occured: Argument 1 ('element') to > > Window.getComputedStyle must be an instance of Element > > I am also running into this issue calling click or clear on an element > inside shadowdom. > > http://127.0.0.1:4444/wd/hub/session/3957A8DD-87E9-47FA-BBA1-5F3FE9AB511C/ > element/node-D45B7A71-2F93-49D6-98AD-9821E0A0BCCC/clear > > Resp: Argument 1 ('element') to Window.getComputedStyle must be an instance > of Element Clicks cannot be targeted to innards of a Shadow DOM tree. That behavior is not spec'd, so that needs to happen first. Clicking the element itself should work. File a new bug if it doesn't. This works in Safari Technology Preview 97 in later. (In reply to Brian Burg from comment #28) > This works in Safari Technology Preview 97 in later. I've upgraded to STP 98 and am still experiencing the issue. Safaridriver is unable to click on buttons using standard click methods OR a Javascript click workaround. (In reply to Duncan Ariey from comment #29) > (In reply to Brian Burg from comment #28) > > This works in Safari Technology Preview 97 in later. > > I've upgraded to STP 98 and am still experiencing the issue. Safaridriver is > unable to click on buttons using standard click methods OR a Javascript > click workaround. Please file a new bug report including steps to reproduce / a reduced test case that I can use to debug. If you need an example of what I'm looking for, this repository is a great starting point. https://github.com/npeceniak/Safari_Iframe_Bug Do not upload confidential/private information to Bugzilla. Instead, go to https://feedbackassistant.apple.com/, create a bug report, and upload information that way. Thanks, Brian Your lovely WebDriver maintainer (In reply to Brian Burg from comment #30) > (In reply to Duncan Ariey from comment #29) > > (In reply to Brian Burg from comment #28) > > > This works in Safari Technology Preview 97 in later. > > > > I've upgraded to STP 98 and am still experiencing the issue. Safaridriver is > > unable to click on buttons using standard click methods OR a Javascript > > click workaround. > > Please file a new bug report including steps to reproduce / a reduced test > case that I can use to debug. If you need an example of what I'm looking > for, this repository is a great starting point. > https://github.com/npeceniak/Safari_Iframe_Bug > > Do not upload confidential/private information to Bugzilla. Instead, go to > https://feedbackassistant.apple.com/, create a bug report, and upload > information that way. > > Thanks, Brian > Your lovely WebDriver maintainer Thank you Brian, just filed a report through feedbackassistant with the title "Safaridriver is unable to click on buttons." I've tested the original issue with STP 98 and seems to be working fine for me now. Thanks for fixing it. ~ Vikrant Hi there! How do I know when STP 98 is included in a final user version. Currently I have 13.0.3 (14608.4.9.1.4) and I'm still having the issue. I assume it doesn't include STP 98 changes. Any page or reference that help me to know when STPs are released to final users? Thanks, Rafael Hi guys, still have a problem with the click method, after clicking nothing happened. Other mac with old safari 12.1.1 (14607.2.6.1.1) and mojave 10.14.5 (18F132) works well. Version 13.0.5 (15608.5.11) Catalina 10.15.3 (19D76) Somebody can give an advice about how to work around it? I'm having the same issue still Version 13.0.5 (13608.5.12) Issue still seen in safari 13. Can someone help on the workaround/fix provided? Please stop piling on with comments. This bug is closed and not being monitored. If you still encounter a similar issue while using the latest Safari Technology Preview, please file a bug via feedbackassistant.apple.com or in the Safari Technology Preview menu via "Help > Report an Issue...". Commenting on old bugs about new issues won't get anything fixed for you, and I probably won't even see your comments. A new bug is the right way to go. (WebKit Bugzilla is primarily a way to review and land patches, and is a poor system to track bug reports from users.) |