
general overview of the course content
download latest Selenium Standalone & setup initial folders layout
https://www.seleniumhq.org/
download latest IEDriverServer.exe & setup initial folders layout
https://www.seleniumhq.org/
download latest chromedriver.exe & setup initial folders layout
http://chromedriver.chromium.org/downloads
download latest geckodriver.exe & setup initial folders layout
https://github.com/mozilla/geckodriver/releases
download latest MicrosoftWebDriver.exe & setup initial folders layout
https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/
download latest Node.js & setup initial folders layout
https://nodejs.org/en/download/
download latest java-jdk, setup initial folders layout & install
https://www.oracle.com/technetwork/java/javase/downloads/index.html
Update 2018-11-18
Since I have found some issues with Selenium & Java 11+ it is recommended to use JDK 8 instead and not the version I show in this lecture. The installation and download process is the same, so you can follow the lecture, just make sure to download the supported version.
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
to find out what is the recommended java version, please visit here (scroll a bit down to see which JDK to use):
https://github.com/SeleniumHQ/selenium#selenium--
other than that, all versions and tools in the course are valid
setup environment variables to allow automaton
JAVA_HOME
download latest Android SDK CLI & setup initial folders layout
https://developer.android.com/studio/
download latest Intel Hardware Accelerated Execution Manager & setup initial folders layout
https://software.intel.com/en-us/articles/intel-hardware-accelerated-execution-manager-intel-haxm
install HAXM to allow android emulator to run properly
install all relevant android-sdk package to allow mobile-native & mobile-web automation
command line
sdkmanager.bat "platform-tools" "platforms;android-26" "platforms;android-27" "platforms;android-28" "emulator" "system-images;android-28;google_apis_playstore;x86"
install all relevant android-sdk package to allow mobile-native & mobile-web automation
command line
sdkmanager.bat "platform-tools" "platforms;android-26" "platforms;android-27" "platforms;android-28" "emulator" "system-images;android-28;google_apis_playstore;x86"
setup environment variables to allow mobile-native & mobile-web automaton
ANDROID_HOME
%JAVA_HOME%\bin
download Python 2.7.8, setup initial folders layout & install
https://www.python.org/ftp/python/
setup python under environment path
add all relevant entries into path system variable
create an android emulator for mobile-native & mobile-web automation
command line
avdmanager.bat create avd -n auto-deployed-avd -k "system-images;android-28;google_apis_playstore;x86" -p D:\automation-env\android-device
install appium-doctor package to insure and check for appium environment setup problems
command line
npm install appium-doctor
install appium allows mobile-web & mobile-automation locally or via selenium grid
command line
npm install appium
create configuration file for selenium grid hub role
configuration
{
"host": "localhost",
"maxSessions": 5,
"port": 4444,
"cleanupCycle": 5000,
"timeout": 300000,
"newSessionWaitTimeout": -1,
"capabilityMatcher": "org.openqa.grid.internal.utils.DefaultCapabilityMatcher",
"throwOnCapabilityNotPresent": true,
"nodePolling": 180000,
"servlets": [],
"prioritizer": null,
"platform": "WIN10"
}
create configuration file for selenium grid node role
configuration
{
"capabilities":[
{
"webdriver_firefox_port": 9513,
"seleniumProtocol": "WebDriver",
"marionette": true,
"maxInstances": 1,
"platform": "WIN10",
"browserName": "firefox"
},
{
"seleniumProtocol": "WebDriver",
"platform": "WIN10",
"browserName": "chrome",
"maxInstances": 1
},
{
"seleniumProtocol": "WebDriver",
"platform": "WIN10",
"browserName": "internet explorer",
"maxInstances": 1
},
{
"seleniumProtocol": "WebDriver",
"platform": "WIN10",
"browserName": "MicrosoftEdge",
"maxInstances": 1
}
],
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"maxSession": 4,
"port": -1,
"register": true,
"registerCycle": 5000,
"hub": "http://localhost:4444",
"nodeStatusCheckTimeout": 5000,
"nodePolling": 5000,
"role": "node",
"unregisterIfStillDownAfter": 60000,
"downPollingLimit": 2,
"debug": false,
"servlets" : [],
"withoutServlets": [],
"custom": {}
}
create configuration file for selenium grid appium node
configuration
{
"capabilities":[
{
"platform": "ANDROID",
"deviceName": "android-device-web",
"nativeDevice": false,
"platformVersion": "5.1.1",
"maxInstances": 1,
"browserName": "chrome"
},
{
"appActivity": ".Calculator",
"platformVersion": "5.1.1",
"platform": "ANDROID",
"deviceName": "android-device-native",
"appPackage": "com.sec.android.app.popupcalculator",
"browserName": "android",
"maxInstances": 1,
"applicationName": "popupcalculator",
"nativeDevice": true
}
],
"configuration":
{
"cleanUpCycle": 2000,
"timeout": 30000,
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"host": "localhost",
"port": 4723,
"maxSession": 1,
"register": true,
"registerCycle": 5000,
"hubPort": 4444,
"hubHost": "localhost"
}
}
create the batch file to run selenium hub
command line
java -jar D:\automation-env\selenium-server-standalone-3.141.5.jar -role hub -hubConfig D:\automation-env\configurations\config-hub.json
create the batch file to run selenium node
command line
java -Dwebdriver.gecko.driver="D:\automation-env\web-drivers\geckodriver.exe" -Dwebdriver.chrome.driver="D:\automation-env\web-drivers\chromedriver.exe" -Dwebdriver.ie.driver="D:\automation-env\web-drivers\IEDriverServer.exe" -Dwebdriver.edge.driver="D:\automation-env\web-drivers\MicrosoftWebDriver.exe" -jar "D:\automation-env\selenium-server-standalone-3.141.5.jar" -role webdriver -port 5566 -nodeConfig D:\automation-env\configurations\config-node.json
create the batch file to run appium node
command line
appium -a localhost --nodeconfig D:\automation-env\configurations\config-node-appium.json
create the batch file to run the whole grid
command line
start D:\automation-env\batch-files\run-hub.bat
start D:\automation-env\batch-files\run-node-appium.bat
start D:\automation-env\batch-files\run-node.bat
create the batch file to run android emulator
command line
D:\automation-env\android-sdk\platform-tools\adb.exe start-server
D:\automation-env\android-sdk\emulator\emulator -avd auto-deployed-avd -netdelay none -netspeed full
check list of how to replicate the automation environment to other machines
copy automation-env to new computer ( on the same partition)
install python
install HAXM
install java
configure config-hub.json
configure config-node.json
configure config-node-appium.json
configure run-node-appium-bat
delete .android folder if exists
reinstall android image
re-create repositories.cfg
set JAVA_HOME
set ANDROID_HOME
set path
send requests to your grid in order to make sure all drivers and tool are properly working
postman download page
https://www.getpostman.com/apps
attend an error which happens when there is no available chrome-driver for mobile-web (android)
this short course was designed to aggregate - once and for all - the complete process of deploying selenium grid. all the small things, tricks, dependencies, gaps and so on, will be answered in this course. teaching you, step by step how to build a fully functional gird from scratch including all browsers, mobile web & mobile native applications (using appium) under a single grid.
you will also learn how to deploy android emulators (without android studio), setup environment variables, node-js, java, python, etc. to fully setup your gird.
this course is not development language dependent and it is relevant for web-driver based automation development regardless of the language or platforms used for development