Skip to content
Advertisement

How to change selenium-standalone port number via webdriverio wdio file?

I need to change the port number of which selenium standalone server is using by default (4444). Port 4444 is currently in use, is there a way to alter the port number via the wdio file?

JavaScript

Currently I’m starting selenium server via the following command:

JavaScript

I have also attempting to use the following with no luck:

JavaScript

Running the above command still attempt to run selenium sever on port 4444.

Advertisement

Answer

To run the selenium-standalone on the specific port you should use the following syntax:

JavaScript

Change the port in the wdi.conf.js:

JavaScript

Also, read more about the wdio configuration file here and about wdio-cli here

So, your final wdio.conf.js should look like:

JavaScript
Advertisement