0 votes
in Selenium by
How many parameters can selenium commands have at minimum?

1 Answer

0 votes
by
There are four parameters that you have to pass in Selenium are

Host

Port Number

Browser

URL

Host: It is the parameter which we use to bind Selenium to a specific IP. Usually, we run selenium tests on our local machine so the value will be ‘localhost’. You can sepcify IP address instead of localhost.

java -jar <selenium server standalone jar name> -host <Your IP Address>

Port Number: TCP/IP port which is used to connect selenium tests to the selenium grid hub. Default port hub is 4444.

java -jar <selenium server standalone jar name> -role hub -port 4444

Make sure no other application in your system is using this port. You may face an exception like Exception in thread “main” java.net.BindException: Selenium is already running on port 4444. Or some other service is.

If this occurs you can either shutdown the other process that is using port 4444, or you can tell Selenium-Grid to use a different port for its hub. Use the -port option for changing the port used by the hub.

java -jar <selenium server standalone jar name> -role hub -port 4441

Browser: To pass the browser which has to execute our selenium scripts

URL: To pass the application URL

Related questions

0 votes
asked Jan 31, 2020 in Selenium by SakshiSharma
0 votes
asked Mar 31, 2021 in Selenium by sharadyadav1986
...