Firefox not loading websites through Selenium proxy

111 views
Skip to first unread message

lionel...@gmail.com

unread,
Sep 26, 2016, 7:43:39 AM9/26/16
to Selenium Users
Hi!

When I start a Selenium test a proxy is started successfully:

DefaultHttpProxyServer:448 - Starting proxy at address: 0.0.0.0/0.0.0.0:0
DefaultHttpProxyServer:477 - Proxy listening with TCP transport
DefaultHttpProxyServer:512 - Proxy started at address: /0:0:0:0:0:0:0:0:57982


Firefox is configured by Selenium to use this proxy. In the settings the proxy is set to my computer's name and to the port 57982.

Unfortunately no connection to a website can be established. Neither one to a page on my local server, nor one to google.com.

I'm using Selenium in the version 2.47.1 and Firefox in 41.0. I'm using Windows 7.

What could be the problem? How can I pin down the problem?

Shubham Agarwal

unread,
Sep 26, 2016, 7:57:21 AM9/26/16
to Selenium Users
may you please specify what error or exception you are getting ?

⇜Krishnan Mahadevan⇝

unread,
Sep 26, 2016, 8:40:31 AM9/26/16
to Selenium Users
Lionel,
There's a lot of things that you haven't told us. So lets start again :

1. Have you tried manually spawning a firefox browser wherein you are setting your proxy server and then ensured that there is no problem with your proxy server [ Are you using BrowserMob Proxy for that ] ?
2. If manually it works fine, but doesn't work when you try it via automation, can you show us how does your code look like ?
3. Have you tried setting a breakpoint in your test code wherein you can manually inspect the browser to see if the proxy settings have indeed been set in your browser ?


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/
My Technical Scribbings @ http://rationaleemotions.wordpress.com/

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/ccadf72c-4a50-4a83-9ec3-72724fd8a7ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

lionel...@gmail.com

unread,
Sep 26, 2016, 10:25:44 AM9/26/16
to Selenium Users
Turned out I've messed up my hosts file and my computer's name pointed to an unreachable IP.

I've removed that line and now Firefox is working with Selenium.
Reply all
Reply to author
Forward
0 new messages