New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GeckoDriver NOT found on path by Selenium even though it is on the path #2672
Comments
We don't look at that environment variable. Details on how to use Marionette can be found at https://developer.mozilla.org/en-US/docs/Mozilla/QA/Marionette/WebDriver |
I think you should read up on how to use the PATH variable.
the PATH environment variable contains a list of directories to scan. You have added a path containing a filename, not a directory.
The line above doesn't even touch the PATH... you are setting a completely different environment variable. you want to add to your path with something like: |
|
@cgoldberg , thank you for telling me that information. I was unaware of that! I made the changes, however, I'm still getting the same error as before. I now have the following line in my path, system variable (added through the Windows GUI)
I kept my path, user variable the way it was and didn't add anything there. *I upgraded to use the latest version of geckodriver, since writing the bug last week. The file that is located in the directory I added to the path has been renamed = "wires.exe" I've tried running the tests with having the file named "wires.exe" and "geckodriver.exe" with no luck either way. The way I see things now, I have fixed my path issues, but still getting the same error. Have we got to the official "I found a real bug" phase yet? Here's what my code looks like now (I have removed the os.environ[] line): from selenium.webdriver.remote.webdriver import WebDriver
from selenium.webdriver.firefox.firefox_profile import FirefoxProfile
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
class Browser(metaclass=Singleton):
"""Encapsulates Selenium functionality regarding the web browser itself. Launching, Quiting, etc."""
def __init__(self):
self.driver = Browser.create_browser(self)
def create_browser(self):
"""Creates and returns a web browser 'driver' object.
This method launches a browser and creates the connections to remotely control it using Selenium.
"""
capabilities = DesiredCapabilities.FIREFOX.copy()
capabilities['platform'] = "WIN10"
capabilities['marionette'] = True
capabilities['binary'] = "C:\Program Files (x86)\Firefox Developer Edition"
ff_profile_dir = "C:\\Users\My_User\PycharmProjects\Automation\FirefoxProfile"
ff_profile = FirefoxProfile(profile_directory=ff_profile_dir)
driver = WebDriver(command_executor='http://127.0.0.1:4444/wd/hub',
desired_capabilities=capabilities,
browser_profile=ff_profile)
driver.implicitly_wait(30)
return driver |
Guys, nevermind! I figured it out!! PyCharm, the IDE I'm using, for some reason needed to be restarted in order to pick up the changes being made in the path, system variable. It works great now. Thank you for all the help!!! |
Hi, Kindly suggest. |
@VnishaS, this issue has been closed. please bring your issue up with the selenium-users-group unless you've found an actual bug with the software. thanks! |
Meta -
OS: Windows 10
Selenium Version: 3.0.0b2 (python bindings)
Selenium Standalone Server Version: selenium-server-standalone-3.0.0-beta2.jar
Python Version: 3.5.1
Browser: Ha, I feel like I've installed them all, not sure what else I can do. Here's the list that I installed and the order in which I installed:
Browser Version:
Firefox = After installing Firefox Beta, the version number of this browser is no longer available (not sure why this browser disappeared). The version that was present immediately prior to the Firefox Beta install = 46.0.1
Firefox Beta = 49.0b6
Firefox Dev Edition = 50.0a2 (2016-08-24)
Expected Behavior -
After hitting run or debug in my Automation project in my PyCharm IDE, my tests should run successfully as they did prior to upgrading Selenium to use capabilities['marionette'] = True.
Firefox should launch, the tests should run, and after the suite is finished, Firefox should close down.
Actual Behavior -
The following error occurs:
Steps to reproduce -
I have the following line added to my system path (I did this through the "Environment Variable..." menu from the Windows 10 System Properties menu, which is accessed through Control Panel):
Additionally, you can see that in my code below, I have the following line, which, to my novice understanding, should programmatically add the geckodriver to the path (am I wrong about this?):
I tried to run my tests, with the following combinations with no luck:
I read that I needed to rename the file to "wires.exe", so am assuming that is still the case. I am confused as to what I'm doing wrong. If nothing, I may have found a legitimate bug. What do you think?
Here's my code that launches the browser:
The text was updated successfully, but these errors were encountered: