Public Repository

Last pushed: 2 years ago
Short Description
Docker for xwalkdriver, the webdriver for crosswalk browser
Full Description

This is docker for xwalkdriver. ONLY support real device for now.


  1. Add your real device to boot2docker-vm in virtualbox. Otherwise docker cannot get connection with real devices

  2. Run commands below:

# Launch xwalkdriver as remote server
$ docker run -d -p 9515:9515 -v /dev/bus/usb:/dev/bus/usb --privileged chenhengjie123/xwalkdriver

# Optional: get xwalkdriver logs in real time
$ docker logs -f da0014b462a0ecd4b2b7f5f38e7f84d2dc97f2fdb0789ab35d90b876daaa74be
  1. Run your test script. The script may look like below(python):
 -*- coding:utf-8 -*-
import os
import unittest

from selenium import webdriver
from time import sleep

# Returns abs path relative to this file and not cwd
PATH = lambda p: os.path.abspath(
    os.path.join(os.path.dirname(__file__), p)

class TestCrossWalk(unittest.TestCase):
    def setUp(self):
        capabilities = {
          'xwalkOptions': {
            'androidPackage': 'com.HCCB.score',
            'androidActivity': '.MainActivity',
            'adb-port': 5037,
        self.driver = webdriver.Remote('', capabilities)

    def tearDown(self):

    def test_login(self):
        print self.driver.page_source
        print self.driver.page_source

if __name__ == '__main__':
    suite = unittest.TestLoader().loadTestsFromTestCase(TestCrossWalk)

The ip address must be the ip address of your boot2docker/host. If you're using boot2docker, its ip address can be found by command like below:

$ boot2docker ip
Docker Pull Command

Comments (0)