Class: Playwright::Android
- Inherits:
-
PlaywrightApi
- Object
- PlaywrightApi
- Playwright::Android
- Defined in:
- lib/playwright_api/android.rb
Overview
Playwright has experimental support for Android automation. You can access android namespace via:
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:
“‘sh js PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 npm i -D playwright “`
Instance Method Summary collapse
-
#devices ⇒ Object
Returns the list of detected Android devices.
-
#off(event, callback) ⇒ Object
– inherited from EventEmitter –.
-
#on(event, callback) ⇒ Object
– inherited from EventEmitter –.
-
#once(event, callback) ⇒ Object
– inherited from EventEmitter –.
-
#set_default_timeout(timeout) ⇒ Object
(also: #default_timeout=)
This setting will change the default maximum time for all the methods accepting ‘timeout` option.
Methods inherited from PlaywrightApi
Constructor Details
This class inherits a constructor from Playwright::PlaywrightApi
Instance Method Details
#devices ⇒ Object
Returns the list of detected Android devices.
15 16 17 |
# File 'lib/playwright_api/android.rb', line 15 def devices wrap_impl(@impl.devices) end |
#off(event, callback) ⇒ Object
– inherited from EventEmitter –
33 34 35 |
# File 'lib/playwright_api/android.rb', line 33 def off(event, callback) event_emitter_proxy.off(event, callback) end |
#on(event, callback) ⇒ Object
– inherited from EventEmitter –
27 28 29 |
# File 'lib/playwright_api/android.rb', line 27 def on(event, callback) event_emitter_proxy.on(event, callback) end |
#once(event, callback) ⇒ Object
– inherited from EventEmitter –
39 40 41 |
# File 'lib/playwright_api/android.rb', line 39 def once(event, callback) event_emitter_proxy.once(event, callback) end |
#set_default_timeout(timeout) ⇒ Object Also known as: default_timeout=
This setting will change the default maximum time for all the methods accepting ‘timeout` option.
20 21 22 |
# File 'lib/playwright_api/android.rb', line 20 def set_default_timeout(timeout) raise NotImplementedError.new('set_default_timeout is not implemented yet.') end |