it:ad:selenium:howto:install

IT:AD:Selenium:HowTo:Install

Getting Selenium up and working for an enterprise environment is not a trivial process.

The *.jar file

In either case – whether you install as a standalone, or a grid root or node, you'll be running the *.jar file – just with different flags:

// Example of starting selenium as a Grid Hub
// using -role and default hub port:
java -jar selenium-2.16.1/selenium-server-standalone-2.16.1.jar -role hub -port 4444

// Example of starting selenium as a Grid Node 
// again using -role, but using the default node port 5555,
// pointing back to the hub instance:
java -jar selenium-server-standalone-2.38.0.jar -role node  -hub http://localhost:4444/grid/register
//same as: java -jar selenium-server-standalone-2.38.0.jar -role node -port 5555 -hub http://localhost:4444/grid/register

//As a chrome webdriver:
java -jar lib/selenium-server-standalone-2.20.0.jar 
     -role webdriver 
     -hub http://localhost:4444/grid/register 
     -browser browserName="chrome",version=ANY,platform=WINDOWS,maxInstances=5 
     -D webdriver.chrome.driver=lib\chromedriver.exe 
//more specifically: You have to start up the NODE with parameter `browser` and add -D parameter specifying the full path to the chromedriver
Src: http://stackoverflow.com/a/10024506/1052767

Registering IE

java -jar selenium-server-standalone-2.25.0.jar -role webdriver 
-browser "browserName=internet explorer,version=8,maxinstance=1,pl
atform=WINDOWS" -hubHost localhost –port 8989

Registering FF

java -jar selenium-server-standalone-2.25.0.jar -role webdriver 
-browser "browserName=firefox,version=9.0.1,maxinstance=1,platform
=MAC" -hubHost localhost –port 8989

Navigate to: the hub's console:

http://localhost:4444/grid/console

You should see all running nodes.

  • /home/skysigal/public_html/data/pages/it/ad/selenium/howto/install.txt
  • Last modified: 2023/11/04 01:56
  • by 127.0.0.1