0

How do I run my code and have Fire fox and chrome actually run from the web browsers to make the actual changes rather then running them in the testing browser? I thought changing the driver location from the one off of selenium to the actual exe location would do it, but it just gives me error about missing driver.

Can some one give me an example? Also I thought you could launch firefox with the profile insted of the driver like so:

from selenium import webdriver
url = "<website name>"
fp = webdriver.FirefoxProfile('C:\\Users\\<admin>\\AppData\\Local\\Mozilla\\Firefox\\Profiles\\t18zcb43.<new profile>')
driver = webdriver.Firefox(fp)
driver.get(url)
Amruta
  • 1,128
  • 1
  • 9
  • 19
Jbravo
  • 43
  • 6
  • What do you mean when you say "run from the web browsers to make the actual changes"? Selenium will navigate to a URL, and everything you do on that URL is happening on the website itself -- data is being saved, requests are sent, etc, it's not just a testing sandbox, you are interacting with live websites. Are you referring to starting a browser that has all of your firefox settings enabled, as opposed to a fresh instance of webdriver? – CEH Nov 20 '19 at 19:36
  • @Christine, Hello again, i'm a little embarrassed that you saw my question since you helped me last time. Basically I'm trying to get firefox to open from the actual browser using the new profile I created with all the settings in it instead of the geckodriver that I downloaded from the selenium website. Every time I run this code it keeps giving me the error -selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH. – Jbravo Nov 20 '19 at 19:51
  • This post should help resolve your error message: https://stackoverflow.com/questions/40208051/selenium-using-python-geckodriver-executable-needs-to-be-in-path Your firefox profile code is correct, but you need to add geckodriver to your path. This will still run geckodriver against your firefox profile, as you have intended. – CEH Nov 20 '19 at 19:56

0 Answers0