class Playwright::Android

Playwright has experimental support for Android automation. This includes Chrome for Android and Android WebView.

Requirements

*Known limitations*

*How to run*

An example of the Android automation script would be:

Note that since you don't need Playwright to install web browsers when testing Android, you can omit browser download via setting the following environment variable when installing Playwright:

“`bash js PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npm i -D playwright “`

Public Instance Methods

default_timeout=(timeout)
Alias for: set_default_timeout
devices() click to toggle source

Returns the list of detected Android devices.

# File lib/playwright_api/android.rb, line 29
def devices
  wrap_impl(@impl.devices)
end
off(event, callback) click to toggle source

– inherited from EventEmitter – @nodoc

# File lib/playwright_api/android.rb, line 53
def off(event, callback)
  event_emitter_proxy.off(event, callback)
end
on(event, callback) click to toggle source

– inherited from EventEmitter – @nodoc

# File lib/playwright_api/android.rb, line 47
def on(event, callback)
  event_emitter_proxy.on(event, callback)
end
once(event, callback) click to toggle source

– inherited from EventEmitter – @nodoc

# File lib/playwright_api/android.rb, line 41
def once(event, callback)
  event_emitter_proxy.once(event, callback)
end
set_default_timeout(timeout) click to toggle source

This setting will change the default maximum time for all the methods accepting `timeout` option.

# File lib/playwright_api/android.rb, line 34
def set_default_timeout(timeout)
  raise NotImplementedError.new('set_default_timeout is not implemented yet.')
end
Also aliased as: default_timeout=

Private Instance Methods

event_emitter_proxy() click to toggle source
# File lib/playwright_api/android.rb, line 57
        def event_emitter_proxy
  @event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
end