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

RE: takeScreenShot and takeElementScreenShot tests

From: John Jansen <John.Jansen@microsoft.com>
Date: Fri, 15 Mar 2019 16:09:55 +0000
To: David Burns <dburns@mozilla.com>, Simon Stewart <simon_stewart@apple.com>
CC: Philip Jägenstedt <foolip@google.com>, "public-browser-tools-testing@w3.org" <public-browser-tools-testing@w3.org>
Message-ID: <MWHPR21MB01751C2DE153D737A2991335F1440@MWHPR21MB0175.namprd21.prod.outlook.com>
>> John do you want to do the spec change and the tests changes?

I should have time to make the changes in the coming weeks, so yeah, I’ll do that.

From: David Burns <dburns@mozilla.com>
Sent: Friday, March 15, 2019 5:51 AM
To: Simon Stewart <simon_stewart@apple.com>
Cc: Philip Jägenstedt <foolip@google.com>; John Jansen <John.Jansen@microsoft.com>; public-browser-tools-testing@w3.org
Subject: Re: takeScreenShot and takeElementScreenShot tests

I am happy for this to have the prompts handled first though Firefox doesn't require it as we arent blocked . John do you want to do the spec change and the tests changes?

David

On Fri, 15 Mar 2019 at 10:17, Simon Stewart <simon_stewart@apple.com<mailto:simon_stewart@apple.com>> wrote:
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.

Simon


On 15 Mar 2019, at 10:11, Philip Jägenstedt <foolip@google.com<mailto: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://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fw3c.github.io%2Fwebdriver%2F%23take-screenshot&data=02%7C01%7CJohn.Jansen%40microsoft.com%7C3fd7595d7fca4eb3fa7008d6a944e6ef%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636882510734843259&sdata=fl8b4wyp6D5TdiC%2FyhBgk%2BWHGwYnybmVnOIfdWeA6KY%3D&reserved=0>
https://w3c.github.io/webdriver/#take-element-screenshot<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fw3c.github.io%2Fwebdriver%2F%23take-element-screenshot&data=02%7C01%7CJohn.Jansen%40microsoft.com%7C3fd7595d7fca4eb3fa7008d6a944e6ef%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636882510734843259&sdata=DMB4lh0G2WY7dfnaDK30JdFRohq88abt0YSFI%2BLCgZ8%3D&reserved=0>

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://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fweb-platform-tests%2Fwpt%2Ftree%2Fmaster%2Fwebdriver%2Ftests%2Ftake_element_screenshot&data=02%7C01%7CJohn.Jansen%40microsoft.com%7C3fd7595d7fca4eb3fa7008d6a944e6ef%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636882510734853268&sdata=wq7NfygLmPnfSapY7XDoHxZWXXXEHqO29bTZippZXbc%3D&reserved=0>
2. https://github.com/web-platform-tests/wpt/tree/master/webdriver/tests/take_screenshot<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fweb-platform-tests%2Fwpt%2Ftree%2Fmaster%2Fwebdriver%2Ftests%2Ftake_screenshot&data=02%7C01%7CJohn.Jansen%40microsoft.com%7C3fd7595d7fca4eb3fa7008d6a944e6ef%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636882510734863276&sdata=KymXbQdv%2BdxhHW7v75lLZ3ztdQHVSqnCb5RRAxjIUBo%3D&reserved=0>

Received on Friday, 15 March 2019 16:10:57 UTC

This archive was generated by hypermail 2.3.1 : Friday, 15 March 2019 16:10:59 UTC