Selenium : scripts et fichiers de paramétrage
Selenium : scripts et fichiers de paramétrage jppLe script de lancement du Hub :
#!/bin/bash OPTIONS=' -hubConfig ./Config/HubConfig.json ' java -jar selenium-server-standalone-2.46.0.jar -role hub $OPTIONS |
Et son fichier de configuration :
{ "host": "127.0.0.1", "port": 4444, "newSessionWaitTimeout": -1, "servlets" : [], "prioritizer": null, "capabilityMatcher": "org.openqa.grid.internal.utils.DefaultCapabilityMatcher", "throwOnCapabilityNotPresent": true, "nodePolling": 5000, "cleanUpCycle": 5000, "timeout": 300000, "browserTimeout": 0, "maxSession": 5, "jettyMaxThreads":-1 } |
Le script de lancement d'un Node :
#!/bin/bash PATH=./:$PATH export PATH export SELENIUM_SERVER_JAR=$(pwd) OPTIONS=' -nodeConfig ./Config/NodeConfig.json ' java -jar selenium-server.jar -role node $OPTIONS |
Et son fichier de config :
{ "capabilities": [ { "browserName": "*firefox", "maxInstances": 5, "seleniumProtocol": "Selenium" }, { "browserName": "*googlechrome", "maxInstances": 5, "seleniumProtocol": "Selenium" }, { "browserName": "*iexplore", "maxInstances": 1, "seleniumProtocol": "Selenium" }, { "browserName": "firefox", "maxInstances": 5, "seleniumProtocol": "WebDriver" }, { "browserName": "chrome", "maxInstances": 5, "seleniumProtocol": "WebDriver" }, { "browserName": "internet explorer", "maxInstances": 1, "seleniumProtocol": "WebDriver" } ], "configuration": { "proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy", "maxSession": 5, "port": 5555, "host": "127.0.0.1", "register": true, "registerCycle": 5000, "hubPort": 4444, "hubHost": "127.0.0.1" } } |