Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in DevOps and Agile by (19.7k points)

from selenium import webdriver

from selenium.common.exceptions import TimeoutException

from selenium.webdriver.support.ui import WebDriverWait # available since 2.4.0

import time

# Create a new instance of the Firefox driver

driver = webdriver.Firefox()

# go to the google home page

driver.get("http://www.google.com")

This opens a Firefox window but does not open a url.

I have a proxy server(but the address bar does not show the passed url)

I have two Firefox profiles.

Can 1 or 2 be an issue? if yes, then how can I resolve it?

1 Answer

0 votes
by (62.9k points)

It is a Selenium bug The problem is in incorrect proxy processing. Default Ubuntu exclusions are located in a no_proxy environment variable: 

no_proxy=localhost,127.0.0.0/8

But /8 mask doesn't work for selenium. In order to solve this problem we need to change no_proxy as follows:

no_proxy=localhost,127.0.0.1

You can also remove proxy settings before executing the python script:

 http_proxy=python script.py

If you are interested to learn Selenium on a much deeper level and want to become a professional in the testing domain, check out Intellipaat’s advanced Selenium training

Browse Categories

...