Firefox browser is not loading with Error: typeError: addon is null

前端 未结 2 622
滥情空心
滥情空心 2021-01-21 22:06
public class firstTest {

    public static void main(String[] args) {

        System.setProperty(\"webdriver.gecko.driver\", \"E:\\\\SOFTWARE\\\\drivers\\\\geckodriver         


        
2条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-21 22:29

    The error says it all :

    Build info: version: '2.48.2', revision: '41bccdd', time: '2015-10-09 19:59:12'
    System info: host: 'xxx', ip: '192.168.43.34', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_40'
    Driver info: driver.version: FirefoxDriver
    

    The error trace logs clearly mention that Browser Client is unable to recognize back the FirefoxDriver binary.

    Your main issue is the version compatibility between the binaries you are using as follows :

    • Your Selenium Client version is 2.48.2 of 2015-10-09 19:59:12 which is almost 2.5 years older.
    • Your JDK version is 1.8.0_40 which is pretty ancient.
    • Your GeckoDriver version is unknown to us.
    • Your Firefox version is unknown to us.

    So there is a clear mismatch between the JDK v8u40 , Selenium Client v2.48.2.

    Solution

    • Upgrade JDK to recent levels JDK 8u162.
    • Upgrade Selenium to current levels Version 3.11.0.
    • Upgrade GeckoDriver to GeckoDriver v0.20.0 level.
    • Upgrade Firefox version to Firefox v59.0.1 levels.
    • Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
    • Use CCleaner tool to wipe off all the OS chores before and after the execution of your test Suite.
    • If your base Firefox base version is too old, then uninstall it through Revo Uninstaller and install a recent GA and released version of Firefox.
    • Execute your @Test.

提交回复
热议问题