Skip to content

Latest commit

 

History

History
53 lines (38 loc) · 1.15 KB

android.md

File metadata and controls

53 lines (38 loc) · 1.15 KB

Android

Enabling remote debugging

You need to create the command line file for Opera for Android and enable remote debugging:

adb shell "echo 'opera --enable-remote-debugging' &> /data/local/tmp/opera-browser-command-line"

Creating an OperaDriver service

# Create OperaDriver service:
from selenium.webdriver.chrome import service
webdriver_service = service.Service('path/to/operadriver')

Creating a remote webdriver

# Create remote webdriver:
from selenium import webdriver
remote = webdriver.Remote(webdriver_service, capabilities)

Depending on capabilites OperaDriver may be connected to the browser in two ways.

  1. Let OperaDriver start Opera.
capabilities = {
    'operaOptions': {
        'androidPackage': 'com.opera.browser'
    }
}
  1. Attach to the existing Opera instance.
capabilities = {
    'operaOptions': {
        'androidPackage': 'com.opera.browser',
        'androidUseRunningPackage': true
    }
}

Browser options

The list of operaOptions for Android is similar to the available desktop options.