Download the latest version of Firefox and download geckodriver.exe

2. To execute in Firefox browser, you need to download the latest version of Firefox browser, and download geckodriver.exe, put it in the Firefox installation directory, and add the directory to the path variable.

The second method is of course to use the limited version of selenium 3.0, because the Firefox browser is not supported by default, and the error Message: 'geckodriver' executable needs to be in PATH should be

        You are no stranger to the problem. As you can see, you need a Firefox browser driver named geckodriver.exe in the path. Of course, the solution is to download a geckodriver.exe and add the stored path to the path. Simple At once

        You can put it directly in the root directory of python. The download address is https://github.com/mozilla/geckodriver/releases. In addition, it should be noted that geckodriver is divided into 32-bit and 64-bit versions, and the version needs to correspond to the browser. When you see the following error, Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line, indicating that your Firefox browser and The driver version does not correspond, you need to ensure that both Firefox and the driver are 32-bit or 64-bit.

   3. By the way, the robotframework version and the ride version that many people are using are relatively backward. First, the latest robotframework version is 3.0, and the ride version is 1.5.2.1. Therefore, if the browser cannot be opened, if

        The above has been done, but it still cannot be opened, the framework is upgraded, and the tools need to be upgraded synchronously

          pip install -U robotframework

       pip install -U robotframework-ride

       pip install -U robotframework-selenium2library

    To sum up, if you use the selenium2.x version, you need Firefox browser version 47 and below. If you use selenium3.0, make sure to download geckodriver and the path is in the path. Currently selenium 3.0 supports Firefox 45 and above. The current latest Firefox browser is 49.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325330268&siteId=291194637