0 votes
in Selenium by
At a bare minimum, how many parameters do selenium commands have?

1 Answer

0 votes
by

The following four parameters need to be passed in Selenium:

1. Host: This is the parameter that binds Selenium to a particular IP address. Because we usually perform Selenium tests on our local system, the value will be 'localhost.' Instead of localhost, you can specify an IP address. 

The Syntax is as follows:

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

2. Port number: TCP/IP port for connecting Selenium tests to the Selenium Grid Hub. 4444 is the default port hub. 

The Syntax is as follows:

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

Assure this port isn't being used by any other software on your machine. An exception like Exception in thread "main" java.net may occur. Selenium is already running on port 4444. BindException: Selenium is already running on port 4444. Alternatively, some other service is available.

If this happens, you may either kill the other process using port 4444 or tell Selenium-Grid to use a new port for its hub. If you want to change the hub's port, the -port option can be used.

3. Browser: For the execution of the selenium scripts I required a browser to be passed.

4. Url: The URL of the application needs to be passed.

Related questions

0 votes
asked Jan 31, 2020 in Selenium by SakshiSharma
0 votes
asked Aug 21, 2019 in Selenium by john ganales
...