question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Instantiating RemoteWebDriver fails and Selenium.WebDriver 3.10.0 + doesn't use default system proxy

See original GitHub issue

Meta

OS: Windows 10 Selenium Version: Selenium.WebDriver 3.10.0 or 3.11.0 or 3.11.1 - C#, .NET 4.6.1 Browser: RemoteWebDriver

Browser Version: na

Expected Behavior

Attempting to instantiate a new RemoteWebDriver instance behind a corporate proxy (which is the system default proxy) should work, given that the proxy allows that traffic. This works fine with Selenium.WebDriver 3.9.1 (and previous versions)

Actual Behavior

Attempting to instantiate a new RemoteWebDriver with 3.10.0 and above fails - it appears that the request does not go via the proxy as previously.

Looking at issue #4478 I’ve tried to implement the code as provided by Jim that will implement a BeforeRemoteHttpRequest event, but the method that hooks into that event never gets hit (my code is identical to that provided in #4478)

Steps to reproduce

Even if you explicitly set the proxy configuration in App.Config like so, this appears to be ignored whereas 3.9.1 will use this configuration.

<system.net> 
    <defaultProxy enabled="true" useDefaultCredentials="true">
      <proxy proxyaddress="<proxy_url>"  />
    </defaultProxy>
</system.net>

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
jimevanscommented, Apr 12, 2018

In the currently released binaries, if you set the Proxy property within the event handler, an exception will be thrown. And no, the system proxy is not being used at present. Going forward, creating your own HttpCommandExecutor and using the event handler will be the only way to set a proxy for a RemoteWebDriver instance to use between the C# code and the Java remote server/grid.

The code you’re using looks correct; I cannot speak to why your event handler isn’t getting invoked. That does not happen for me.

0reactions
gschultz77commented, May 9, 2018

This issue has now been resolved with the 3.12.0 release and ability to successfully use a HttpCommandExecutor and explicitly set the proxy in the SendingRemoteHttpRequest event handler. Thanks 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Selenium Chrome WebDriver doesn't use proxy - Stack Overflow
I'm using Selenium webdriver to open a webpage and I set up a proxy for the driver to use. The code is listed...
Read more >
selenium-wire - PyPI
Create the driver with no options (use defaults) driver = webdriver. ... Selenium Wire has limited support for using the remote webdriver client....
Read more >
devtoolsactiveport file doesn't exist windows - You.com
I get the error DevToolsActivePort file doesn't exist when I try to open an chrome instance. I do kill old tasks before and...
Read more >
Cucumber tests integration - Failed to instantiate class base ...
Answer a question I have been running the Cucumber tests on my system successfully. The tests I write are being managed in Bitbucket....
Read more >
chromium / external / github.com / SeleniumHQ / selenium / py ...
Remote webdriver can now be started when passing options. * All Options.to_capabilities now start with default DesiredCapabilities. * Improve the error ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found