Public | Automated Build

Last pushed: 2 years ago
Short Description
stack to run a selenium ruby test on android device
Full Description

example usage:

(amd64)ubuntu@localhost:~$ docker run -d --privileged -v /dev/bus/usb:/dev/bus/usb --name adbd sorccu/adb
04_____________________________________________cc
(amd64)ubuntu@localhost:~$ docker run --privileged --rm -ti --net container:adbd sorccu/adb adb devices
List of devices attached
RO_________H3    device

(amd64)ubuntu@localhost:~$
(amd64)ubuntu@localhost:~$ docker run -d --net container:adbd crowdprobe/selenium-android
fd_____________________________________________a7
(amd64)ubuntu@localhost:~$ docker run -ti --rm --net container:adbd crowdprobe/selenium-android-ruby-tester
android@04________21:/opt/ruby-selenium-test$ ls
android-selenium-test.rb
android@04________21:/opt/ruby-selenium-test$ cat android-selenium-test.rb 

require 'selenium-webdriver'

begin
  caps = {
    'chromeOptions' => {
      'androidPackage' => 'com.android.chrome',
    }
  }
  driver = Selenium::WebDriver.for :remote, :url => "http://localhost:9515", :desired_capabilities => caps
  driver.get "http://www.google.com"
  driver.save_screenshot "die_Google.png"
  driver.quit
end

android@04________21:/opt/ruby-selenium-test$ time ruby android-selenium-test.rb 

real    0m13.434s
user    0m0.688s
sys    0m0.152s
android@04________21:/opt/ruby-selenium-test$ ls
android-selenium-test.rb  die_Google.png
android@04________21:/opt/ruby-selenium-test$ echo YEY
YEY
android@04________21:/opt/ruby-selenium-test$

Google is a trademark of Google Inc.

Docker Pull Command
Owner
crowdprobe
Source Repository