Aditya Sharma
Aditya Sharma

Reputation: 1

Selenium Python firefox webdriver

FirefoxProfile profile = new FirefoxProfile();

profile.setPreference("network.proxy.type", 1);

profile.setPreference("network.proxy.http", "localhost");

profile.setPreference("network.proxy.http_port", 3128);

WebDriver driver = new FirefoxDriver(firefox_profile=profile);

I am using below code to config but it's giving an error. You should need to be include executive path. How can I solve it. I am Running this code in pycharm.

You can also see the image for more brief

Upvotes: 0

Views: 62

Answers (1)

Madhan
Madhan

Reputation: 323

You need to specify the path.

  1. Try this out option 1
  2. option 2
from selenium import webdriver
    browser = webdriver.Firefox(executable_path = '/path/to/geckodriver')
    browser.get('https://www.google.com') 

Upvotes: 0

Related Questions