'org.openqa.selenium.WebDriverException: Invalid byte 10, offset 76

I am having a method which returns the web driver for firefox, while running the tests they are getting failed throwing the error

"org.openqa.selenium.WebDriverException: Invalid byte 10, offset 76."

On searching I couldn't find anything related to error. Have pasted the code as well.

        System.setProperty("webdriver.gecko.driver", "/Users/sdabral/Downloads/geckodriver");
        final DesiredCapabilities capabilities = new DesiredCapabilities(DesiredCapabilities.firefox());
        FirefoxProfile profile = new FirefoxProfile();
        profile.setPreference("security.mixed_content.block_active_content",
                false); //Required for browser mixed contents
        capabilities.setCapability(FirefoxDriver.PROFILE, profile);
        final WebDriver wd = new RemoteWebDriver(capabilities);
        return wd;

The path to geckodriver is correct as referenced other answers related to WebDriverException.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source