Re: [w3c/permissions] Introduce "Automation" section (#151)

> The test writer would have no way to control this either, because they only
> have the ability to react to prompts if they are shown. So it feels like we
> would need a way for test writers to define this initial state in the first
> place anyway.

Technically, they *could* write tests that accounted for this uncertainty, e.g.:

```js
driver.click('.enable')
  .then(() => driver.grant({ name: 'midi', sysex: true }).catch(() => {}))
  .then(/* etc. */)
  .then(/* etc. */)
  .then(/* etc. */);
```

...and even though the pattern could be encapsulated in WebDriver language bindings themselves (e.g. a `grantIfPrompted` method), none of this is ideal.

> I certainly have no expertise with WebDriver though and am happy for those
> patterns to inform the decision

I appreciate that, but this detail about prompts being optional seems unprecedented, potentially limiting the relevance of those existing APIs. I'd love to hear from @shs96c again to see if he was aware of this and if it effects his recommendation.

(...and while I know this isn't the place to discuss it, I'm wondering why the specification is so permissive in this regard. It seems like the unpredictability we're discussing is more than just a challenge for automated tests--it could impact usability, too. Do you know if there is anything published online about the design decision?)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/permissions/pull/151#issuecomment-310526305

Received on Thursday, 22 June 2017 23:07:36 UTC