Re: Controlling the browser environment/settings

So there is an undocumented WebDriver API for doing this
https://github.com/SeleniumHQ/selenium/blob/master/java/client/src/org/openqa/selenium/html5/BrowserConnection.java

>From what I understand this was only ever implemented in the now
deprecated and removed from source AndroidDriver.

Mobile has explicit desire to enable this 'offline' mode for the same
reasons you bring up.

I'm currently in the process of attempting an "airplane mode" as
defined by our mobile spec:
https://code.google.com/p/selenium/source/browse/spec-draft.md?repo=mobile#110

It's giving me grief on Android thus far since enabling "airplane
mode" will then cut the http server communication with our 'server' we
run on device to interpret commands.

On Thu, Mar 27, 2014 at 8:33 AM, David Burns <dburns@mozilla.com> wrote:
> I have never tried it but I fully expect WebDriver to get a little upset by
> this (note I havent tried this). With WebDriver, from the OSS world and from
> Marionette, we expect there to be a network so that we can speak to the
> browser (with FirefoxDriver we need to communicate with httpd.js and with
> Marionette we go in via the remote debugger).
>
> David
>
>
> On 27/03/2014 12:24, James Graham wrote:
>>
>> For testing certain kinds of things it is very useful to be able to put
>> the browser into unusual modes which cannot be activated via normal web
>> apis. The particular example that I have in mind is offline mode; being able
>> to simulate the browser disconnecting and reconnecting to the network is
>> very useful for testing technologies such as AppCache / Service Worker and
>> web applications using these features to provide offline support.
>>
>> Since this is something that can't be provided as a DOM API (except in
>> some hypothetical debug mode) and that is very useful both for testing
>> browsers and for testing web applications, it seems like WebDriver would be
>> the natural home for such a feature. Is it already supported in some way
>> that I missed? If not is it something that could be added?
>>
>
>

Received on Thursday, 27 March 2014 15:48:57 UTC