W3C home > Mailing lists > Public > public-browser-tools-testing@w3.org > January to March 2019

Re: takeScreenShot and takeElementScreenShot tests

From: Simon Stewart <simon_stewart@apple.com>
Date: Fri, 15 Mar 2019 10:16:17 +0000
Message-id: <6D322F24-CDF8-4DF4-9482-F298939FD168@apple.com>
Cc: John Jansen <John.Jansen@microsoft.com>, "public-browser-tools-testing@w3.org" <public-browser-tools-testing@w3.org>
To: Philip Jägenstedt <foolip@google.com>
There’s an open issue to review all the commands to ensure that the “handle prompts” checks are in place. I can’t help but feel that the screenshot commands probably need this check added.


> On 15 Mar 2019, at 10:11, Philip Jägenstedt <foolip@google.com> wrote:
> It looks like these commands don't have the "Handle any user prompts" step that so many others do:
> https://w3c.github.io/webdriver/#take-screenshot <https://w3c.github.io/webdriver/#take-screenshot>
> https://w3c.github.io/webdriver/#take-element-screenshot <https://w3c.github.io/webdriver/#take-element-screenshot>
> I guess that means the spec things these endpoints should work even with prompts open? That seems weird to me. What was the behavior you saw, did the tests fail or did the dialog actually appear in the screenshot?
> On Fri, Mar 15, 2019 at 1:05 AM John Jansen <John.Jansen@microsoft.com <mailto:John.Jansen@microsoft.com>> wrote:
> Hey all,
> I was trying to fix the take_element_screenshot[1] and take_screenshot[2] tests for Chrome, but I see an issue. 
> In the tests, there is an unexpected dialog appearing. It seems like none of the browsers are handling this; however, Firefox still passes the tests, even though the dialog is up. ChromeDriver and EdgeDriver both fail due to an error that there is an unexpected dialog up.
> I remember discussing this at TPAC. My memory is that the steps in the spec were supposed to be modified to include handling unexpected prompts, but I wanted to confirm - there was some confusion in the github issue and some discussion offline, I believe. 
> So, two questions: 
> 1. Should I modify the driver to dismiss the prompt before taking the screenshot?
> 2. Should we instead modify the expectation of the tests so that you FAIL if you take a screenshot with the dialog up?
> -John
> 1. https://github.com/web-platform-tests/wpt/tree/master/webdriver/tests/take_element_screenshot <https://github.com/web-platform-tests/wpt/tree/master/webdriver/tests/take_element_screenshot>
> 2. https://github.com/web-platform-tests/wpt/tree/master/webdriver/tests/take_screenshot <https://github.com/web-platform-tests/wpt/tree/master/webdriver/tests/take_screenshot>
Received on Friday, 15 March 2019 10:17:26 UTC

This archive was generated by hypermail 2.3.1 : Friday, 15 March 2019 10:17:27 UTC