Setting Port on chromedriver.exe

12,372 views
Skip to first unread message

SeleniumIntern

unread,
Aug 2, 2012, 11:01:34 AM8/2/12
to seleniu...@googlegroups.com
I was getting the following error when using the chrome driver in C#

: OpenQA.Selenium.WebDriverException: No response from server for url http://localhost:62289/session/e0b6b5d1a3a2f68165dc7e56eaabb745/elements

After doing some online searches most say its too many connections to a proxy server? (not using a proxy) or a firewall block.

I emailed my network helpdesk seeing if they could open a port for me to try if that will work.  But I will need chromedriver.exe to always use the same port if I do that.  I tried the following code
Enter code here...            ChromeOptions chromeOptions = new ChromeOptions();
            chromeOptions
.AddArgument("port=8080");      
            chromeDriver
= new ChromeDriver(@"D:\SVN\CSP\Trunk");

but it didn't change the port, (also tried '--port = 8080')

If you have any ideas on how to fix the error I am getting or how to set the port to a static number I would appreciate the help.  Thanks!


ephraim vallejo

unread,
Aug 2, 2012, 11:05:49 AM8/2/12
to seleniu...@googlegroups.com
Have you tried using what selenium uses as default, which is 4444. Try that and see what happens.


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/YoavOifXzP0J.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Krishnan Mahadevan

unread,
Aug 2, 2012, 11:10:39 AM8/2/12
to seleniu...@googlegroups.com
I dont think port 4444 is applicable in the case of ChromeDriver or any other driver for that matter.

I believe it is applicable only when you instantiate DefaultSelenium.

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"

SeleniumIntern

unread,
Aug 2, 2012, 11:15:46 AM8/2/12
to seleniu...@googlegroups.com
I am having trouble getting the syntax/process right to actually set the port.  Once I can get it to set the port I can try the different options.


On Thursday, August 2, 2012 11:05:49 AM UTC-4, Ephraim wrote:
Have you tried using what selenium uses as default, which is 4444. Try that and see what happens.

On Thu, Aug 2, 2012 at 8:01 AM, SeleniumIntern <houc...@gmail.com> wrote:
I was getting the following error when using the chrome driver in C#

: OpenQA.Selenium.WebDriverException: No response from server for url http://localhost:62289/session/e0b6b5d1a3a2f68165dc7e56eaabb745/elements

After doing some online searches most say its too many connections to a proxy server? (not using a proxy) or a firewall block.

I emailed my network helpdesk seeing if they could open a port for me to try if that will work.  But I will need chromedriver.exe to always use the same port if I do that.  I tried the following code
Enter code here...            ChromeOptions chromeOptions = new ChromeOptions();
            chromeOptions
.AddArgument("port=8080");      
            chromeDriver
= new ChromeDriver(@"D:\SVN\CSP\Trunk");

but it didn't change the port, (also tried '--port = 8080')

If you have any ideas on how to fix the error I am getting or how to set the port to a static number I would appreciate the help.  Thanks!


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to selenium-users@googlegroups.com.
To unsubscribe from this group, send email to selenium-users+unsubscribe@googlegroups.com.

Jim Evans

unread,
Aug 2, 2012, 11:44:05 AM8/2/12
to seleniu...@googlegroups.com
You can't in the .NET bindings. At least, not yet. There is a pending change that will allow you to explicitly set the port for the chromedriver.exe. In the meantime, you can manually launch chromedriver.exe with the specific port and use the RemoteWebDriver class.

SeleniumIntern

unread,
Aug 2, 2012, 2:21:54 PM8/2/12
to seleniu...@googlegroups.com
I set up the 'remote' driver, tried port 8080, 39, 4444, they all still gave me the "No response from server for url " once I got to uploading a CSV file, I guess now I have to wait for my helpdesk to open up something unless my thoughts on what is wrong are incorrect?

Ivana Zivkovic

unread,
Feb 26, 2014, 5:42:47 PM2/26/14
to seleniu...@googlegroups.com
If you managed to set the port, I would appreciate to hear a solution. I tried a lot of different ways but none works. I need the correct syntax. Thx!

Mohammad Saad

unread,
Jan 25, 2016, 2:07:54 AM1/25/16
to Selenium Users

start the chrome driver like this: (in .Net )   

string DRIVER_PATH = ConfigurationManager.AppSettings[“ChromeDriverPath”];
ChromeDriverService serviceCR = ChromeDriverService.CreateDefaultService(DRIVER_PATH);
serviceCR
.Port = 9510;
IWebDriver WebDriver = new ChromeDriver(serviceCR);

Ram

unread,
Apr 5, 2017, 7:20:43 AM4/5/17
to Selenium Users
Hi Mohammad,

How to set port for chromedriver using java. My selenium test cases are getting failed beacuse of firewall blocking default port.
Reply all
Reply to author
Forward
0 new messages