On Mon, Sep 10, 2018 at 11:19 AM James Graham <ja...@hoppipolla.co.uk>
wrote:

> On 07/09/2018 21:27, Ehsan Akhgari wrote:
>
> > Very cool, I did not know this!  It seems like test_driver.bless() is
> > what we need here for simulating a user activation gesture.
> >
> >     However it sounds like in this case you may need to add test-only
> APIs
> >     for manipulating internal browser state. There are two possible
> >     approaches here:
> >
> >     * Add a feature to WebDriver for manipulating this data. This can be
> >     specified in the StorageManager spec and is appropriate if we want to
> >     add something that can be used by authors as part of the automated
> >     testing for their website.
> >
> >     * Add test-only DOM APIs in the StorageManager spec that we can
> enable
> >     when running the browser in test mode. Each browser would be
> >     expected to
> >     have some implementation-specific means to enable these APIs when
> under
> >     test (e.g. a pref). WebUSB has an example of this approach.
> >
> >
> > This is something that I should get some feedback on from at least
> > WebKit before deciding on a path forward, but from a Gecko perspective,
> > we basically need to call one function at the beginning and one function
> > at the end of each test, so looks like the first option would be
> > sufficient.  Do you happen to have an example of that handy?  I've never
> > done something like this before, and I do appreciate some pointers to
> > get started.
>
> You want an example of a spec adding a WebDriver-based test API? (I'm
> not 100% sure I interpreted your message correctly). The permissions
> spec has one [1].
>
> [1] https://w3c.github.io/permissions/#automation
>

Thanks, this is exactly what I wanted to find!

-- 
Ehsan
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to