{"id":20350027,"url":"https://github.com/webbestmaster/web-driver","last_synced_at":"2026-05-29T21:31:24.708Z","repository":{"id":89686990,"uuid":"61386337","full_name":"webbestmaster/web-driver","owner":"webbestmaster","description":null,"archived":false,"fork":false,"pushed_at":"2016-09-13T14:00:40.000Z","size":44745,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-14T23:46:21.189Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webbestmaster.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-17T16:10:25.000Z","updated_at":"2016-06-17T16:20:28.000Z","dependencies_parsed_at":null,"dependency_job_id":"01ac8dec-391a-49ef-88ec-2999b7231542","html_url":"https://github.com/webbestmaster/web-driver","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webbestmaster%2Fweb-driver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webbestmaster%2Fweb-driver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webbestmaster%2Fweb-driver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webbestmaster%2Fweb-driver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webbestmaster","download_url":"https://codeload.github.com/webbestmaster/web-driver/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241879291,"owners_count":20035754,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T22:28:36.951Z","updated_at":"2026-05-29T21:31:24.702Z","avatar_url":"https://github.com/webbestmaster.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"add options for all browsers - chrome = require('selenium-webdriver/chrome')\n\n\n\n\nurlPostfix - add postfix after url (default: '') - f.e. urlPostfix=?tablet=1\nurl - push custom url instead default url (default: 'http://gala-bingo/') - f.e. url=http://m.galabingo.com\nbrowser - set browser (default: chrome) - f.e. browser=firefox\nlist - list of test (default: false, e.g. all tests) - f.e. list=login,logout\nhost - run on mobile device (default: ''), if use '+host' or 'host=true' - will be run om mobile device\ntablet - use tablet mode (default: false), f.e. +tablet of tablet=true\nua - set user agent, f.e. ua=io7iPad\nlog - set logging (default: true), f.e. +log\n\n\n// package.json has dependency \"nodemailer\" it will be used in future\n\nhow to run test on mobile device\n\n1 - download and install: android-server-2.21.0.apk\n1.1 - if needed install KiesSetup.exe or Kies_3.2.14113_3.exe\n2 - download android SDK\n3 - connect device and PC\n4 - go to ~sdk/platform-tools/, there you will see 'adb.exe' file\n5 - run from cmd 'adb devices' or '$./adb devices' to see list of connected devices, if list is empty install Keis (see 1.1)\n6 - run from cmd 'adb forward tcp:8080 tcp:8080' to listen :8080 (use the same port for webdriver host f.e 'http://localhost:8080/wd/hub' )\n\nrun webdriver on device and run test with follow constructor\n\nvar webDriver = require('selenium-webdriver');\nvar driver = new webDriver\n\t.Builder()\n\t.usingServer('http://localhost:8080/wd/hub') // leave empty ( .usingServer() or with '' ) to use regular port\n\t.withCapabilities({ browserName: args.browser })\n\t.build();\n\ndone\n\nAppendix\n\nPath to node interpreter /usr/local/bin/node\n\nInstall apk to device from pc\n$./adb -s \\\u003cserialId\\\u003e -e install -r  android-server.apk\n\nStart the Android WebDriver application through the UI of the device or by running this command:\n$./adb -s \\\u003cserialId\\\u003e shell am start -a android.intent.action.MAIN -n org.openqa.selenium.android.app/.MainActivity\n\nYou can start the application in debug mode, which has more verbose logs by doing:\n$./adb -s \\\u003cserialId\\\u003e shell am start -a android.intent.action.MAIN -n org.openqa.selenium.android.app/.MainActivity -e debug true\n\nYou can close the application:\n$./adb shell am force-stop org.openqa.selenium.android.app\n\nFinally, we need to expose this server to the Selenium clients running the tests adding a port forward. Identify a PC local port that is not in use and execute this command:\nadb -s \\\u003cdevice-id\\\u003e forward tcp:\\\u003cpc-port\\\u003e tcp:8080\n\n// here is java\n// \\\u003cpc-ip\\\u003e - you can use just 'localhost'\nDesiredCapabilities browser = DesiredCapabilities.android();\nWebDriver driver = new RemoteWebDriver(new URL(\"http://\\\u003cpc-ip\\\u003e:\\\u003cpc-port\\\u003e/wd/hub\"), browser);\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebbestmaster%2Fweb-driver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebbestmaster%2Fweb-driver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebbestmaster%2Fweb-driver/lists"}