0

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

1 Answers1

0

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') 
Madhan
  • 305
  • 1
  • 5
  • 10
  • Yeah I know this solution but I am doing it with proxy. do you know how to open a url using proxy. thanks. – Aditya Sharma Mar 11 '21 at 17:38
  • But form the image you have posted, it seems gecko driver path is not specified. That is why you are getting `FileNotFoundError`. I believe this has nothing to do with the proxy. – Madhan Mar 12 '21 at 05:17