Service Virtualization

Expand all | Collapse all

Failed to load extension from ".\." pop-up while running DevTest selenium step

Jump to Best Answer
  • 1.  Failed to load extension from ".\." pop-up while running DevTest selenium step

    Posted 05-07-2018 11:17 PM

    While running DevTest 9.0 Selenium step for launching a Chrome browser, user who do not have Admin access on the machine will get a pop error message saying "Failed to load extension from {{location}}".

     

    I found that its a Chrome issue for which it's advised to set a below property options.setExperimentalOption("useAutomationExtension", false);

    But we are not sure how to set the same in DevTest 9.0. Can some one help on this is you have faced this issue.



  • 2.  Re: Failed to load extension from ".\." pop-up while running DevTest selenium step
    Best Answer

    Broadcom Employee
    Posted 06-13-2018 01:44 AM

    Hi Raghu,

     

    The chrome options which are defined as the command line arguments can be defined at the
                 {
                   "name": "chromeOptions",
                   "value": "{'args': [],
                              'detach': false}",
                   "type": "map"
                },
    part of the selenium-config.json file which should be located in LISA_HOME.

    If the '("useAutomationExtension", false);' for options.setExperimentalOption is equal to the argument "--disable-extensions", then this part may be
               {
                   "name": "chromeOptions",
                   "value": "{'args': ['--disable-extensions'],
                              'detach': false}",
                   "type": "map"
                },
    .

    To read the URL:
    https://www.blogarama.com/blogging-blogs/1295590-selenium-web-driver-tutorials-blog/24668466-loading-unpacked-extensions-disabled-administrator
    The '("useAutomationExtension", false);' for options.setExperimentalOption seems to work same as the argument "--disable-extensions".

     

    However, if the '("useAutomationExtension", false);' for options.setExperimentalOption is not equal to the argument "--disable-extensions" or to set the argument "--disable-extensions" in selenium-config.json file does not have any changes, then please create a support case to ask the question like "The options.setExperimentalOption for chrome can be set or not to the Selenium integration in DevTest".

     

    Thank you,



  • 3.  Re: Failed to load extension from ".\." pop-up while running DevTest selenium step

    Posted 07-30-2018 01:57 AM

    Thanks a lot for your suggestion Yusuke, instead of "--disable-extensions" i have used "-disable-extensions" in the selenium config file. And the script is working now.

    Thanks again.



  • 4.  Re: Failed to load extension from ".\." pop-up while running DevTest selenium step

    Posted 09-25-2018 05:34 PM

    Hi Yusuke,

     

    Thanks for this information. We had the same problem of a popup and it was resolved by adding above information. 

     

    Is it possible for you to provide JSON structure for selenium-config to add Proxy information. 

     

    I tried with below, but it is not working for some reason. 

     

    {
    "Version": 1,

    "Description": "This file is used to define Selenium web driver info.",

    "Web_Drivers": {

    "Chrome": {
    "Class_Name": "org.openqa.selenium.chrome.ChromeDriver",

    "Capabilities": [
    {
    "name": "chromeOptions",
    "value": "{'args': ['-disable-extensions'],
    'detach': false}",
    "type": "map"
    },
    {
    "name": "proxy",
    "value": "{'proxyType':'SYSTEM'}",
    "type": "map"
    },
    {
    "name": "acceptSslCerts",
    "value": "true",
    "type": "boolean"
    }
    ]

    }

    }
    }

     

    Thanks,

    Prakhar



  • 5.  Re: Failed to load extension from ".\." pop-up while running DevTest selenium step

    Broadcom Employee
    Posted 09-27-2018 03:16 AM

    Hi PRAKHAR,

     

    By default, selenium-config,json does not include the definitions like:
    {
     "name": "proxy",
     "value": "<default>",
     "type": "map"
     },
    inside chrome definition.
    Then I do not think your modification will reflect to the DevTest environment.

    I did not check the chrome options which related proxy but if there is a argument related proxy for chrome, then maybe you can use this style:
    {
     "Version": 1,

    "Description": "This file is used to define Selenium web driver info.",

    "Web_Drivers": {

    "Chrome": {
     "Class_Name": "org.openqa.selenium.chrome.ChromeDriver",

    "Capabilities": [
     {
     "name": "chromeOptions",
     "value": "{'args': ['-disable-extensions','-<proxy related argument>=<value>'],
     'detach': false}",
     "type": "map"
     },
     {
     "name": "acceptSslCerts",
     "value": "true",
     "type": "boolean"
    }
     ]

    }

    }
    }

    If you find a argument which related proxy for chrome, then please try.

     

    Thank you,