Unable to load chrome extension on edge(chromium) testing

Hi,

I tried to open edge(chromium) browser following below page.

Below image is my Katalon Settings.

However, it didn’t work.

I tried below code.

 System.setProperty("webdriver.edge.driver",msedgedriverPath);  
 EdgeOptions op=new EdgeOptions();
 op.addExtensions(new File(myExtensionPath));
 DesiredCapabilities capabilities = new DesiredCapabilities();
 capabilities.setCapability(EdgeOptions.CAPABILITY, op);
 op.merge(capabilities); 
 WebDriver browser = new EdgeDriver(op);

However, return below error.

2020-11-20 15:14:11.576 ERROR k.k.c.m.CustomKeywordDelegatingMetaClass - ❌ groovy.lang.MissingMethodException: No signature of method: org.openqa.selenium.edge.EdgeOptions.addExtensions() is applicable for argument types: (java.io.File) values: [C:\Users\~~~~~.crx]
2020-11-20 15:14:11.580 ERROR c.k.katalon.core.main.TestCaseExecutor   - ❌ Test Cases/dev/delete_all_services FAILED.
Reason:
org.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: org.openqa.selenium.edge.EdgeOptions.addExtensions() is applicable for argument types: (java.io.File) values: [C:\Users\~~~~~.crx]
	at basicfeature.BasicFeature.invokeMethod(basicFeature.groovy)
	at com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass.invokeStaticMethod(CustomKeywordDelegatingMetaClass.java:50)
	at delete_all_services.run(delete_all_services:18)
	at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
	at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
	at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:339)
	at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:330)
	at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:309)
	at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:301)
	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:235)
	at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:191)
	at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:141)
	at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:90)
	at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)
	at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
	at TempTestSuite1605852849121.run(TempTestSuite1605852849121.groovy:39)
Caused by: groovy.lang.MissingMethodException: No signature of method: org.openqa.selenium.edge.EdgeOptions.addExtensions() is applicable for argument types: (java.io.File) values: [C:\Users\~~~~~.crx]
	at basicfeature.BasicFeature.startBrowser(basicFeature.groovy:204)
	... 16 more

2020-11-20 15:14:11.723 INFO  c.k.katalon.core.main.TestCaseExecutor   - END Test Cases/dev/delete_all_services
2020-11-20 15:14:11.727 INFO  c.k.katalon.core.main.TestCaseExecutor   - --------------------
2020-11-20 15:14:11.728 INFO  c.k.katalon.core.main.TestCaseExecutor   - START Test Cases/test/ST001_002/sign_in
2020-11-20 15:14:11.924 DEBUG testcase.sign_in                         - 1: basicfeature.BasicFeature.startBrowser()
2020-11-20 15:14:11.932 ERROR k.k.c.m.CustomKeywordDelegatingMetaClass - ❌ groovy.lang.MissingMethodException: No signature of method: org.openqa.selenium.edge.EdgeOptions.addExtensions() is applicable for argument types: (java.io.File) values: [C:\Users\~~~~~.crx]
2020-11-20 15:14:11.936 ERROR c.k.katalon.core.main.TestCaseExecutor   - ❌ Test Cases/test/ST001_002/sign_in FAILED.
Reason:
org.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: org.openqa.selenium.edge.EdgeOptions.addExtensions() is applicable for argument types: (java.io.File) values: [C:\Users\~~~~~.crx]
	at basicfeature.BasicFeature.invokeMethod(basicFeature.groovy)
	at com.kms.katalon.core.main.CustomKeywordDelegatingMetaClass.invokeStaticMethod(CustomKeywordDelegatingMetaClass.java:50)
	at sign_in.run(sign_in:18)
	at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)
	at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)
	at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:339)
	at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:330)
	at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:309)
	at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:301)
	at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:235)
	at com.kms.katalon.core.main.TestSuiteExecutor.accessTestCaseMainPhase(TestSuiteExecutor.java:191)
	at com.kms.katalon.core.main.TestSuiteExecutor.accessTestSuiteMainPhase(TestSuiteExecutor.java:141)
	at com.kms.katalon.core.main.TestSuiteExecutor.execute(TestSuiteExecutor.java:90)
	at com.kms.katalon.core.main.TestCaseMain.startTestSuite(TestCaseMain.java:157)
	at com.kms.katalon.core.main.TestCaseMain$startTestSuite$0.call(Unknown Source)
	at TempTestSuite1605852849121.run(TempTestSuite1605852849121.groovy:39)
Caused by: groovy.lang.MissingMethodException: No signature of method: org.openqa.selenium.edge.EdgeOptions.addExtensions() is applicable for argument types: (java.io.File) values: [C:\Users\~~~~~.crx]
	at basicfeature.BasicFeature.startBrowser(basicFeature.groovy:204)
	... 16 more

OS: Windows 10
Katalon Studio version: 7.7.2

Could anyone please tell me advice ?

Thanks.

It sounds like you’re not supplying a List type to the addExtensions method.

The class documentation is here:

https://www.selenium.dev/selenium/docs/api/java/org/openqa/selenium/edge/EdgeOptions.html

Hi, @Russ_Thomas

This issue has been resolved !

Thanks !