diff --git a/webdriver/resources/web-extension/web-extension.crx b/webdriver/resources/web-extension/web-extension.crx new file mode 100644 index 000000000..c174d369c Binary files /dev/null and b/webdriver/resources/web-extension/web-extension.crx differ diff --git a/webdriver/src/org/testar/monkey/alayer/webdriver/WdDriver.java b/webdriver/src/org/testar/monkey/alayer/webdriver/WdDriver.java index 9cb3613c1..3cd3cedfc 100644 --- a/webdriver/src/org/testar/monkey/alayer/webdriver/WdDriver.java +++ b/webdriver/src/org/testar/monkey/alayer/webdriver/WdDriver.java @@ -176,10 +176,10 @@ private static RemoteWebDriver startChromeDriver(String chromeDriverPath, .usingAnyFreePort() .build(); ChromeOptions options = new ChromeOptions(); - - System.out.println("--load-extension=" + extensionPath); - - options.addArguments("--load-extension=" + extensionPath); + + System.out.println("EXTENSION: " + extensionPath + "/web-extension.crx"); + + options.addExtensions(new File(extensionPath + "/web-extension.crx")); options.addArguments("--disable-infobars"); if(fullScreen) { options.addArguments("--start-maximized"); diff --git a/webdriver/src/org/testar/monkey/alayer/webdriver/WdElement.java b/webdriver/src/org/testar/monkey/alayer/webdriver/WdElement.java index 6a703283f..7281f09dd 100644 --- a/webdriver/src/org/testar/monkey/alayer/webdriver/WdElement.java +++ b/webdriver/src/org/testar/monkey/alayer/webdriver/WdElement.java @@ -162,9 +162,6 @@ public WdElement(Map packedElement, WdRootElement root, WdElemen List> wrappedChildren = (List>) packedElement.get("wrappedChildren"); - - System.out.println("DEBUG wrappedChildren: " + wrappedChildren.size()); - for (Map wrappedChild : wrappedChildren) { WdElement child = new WdElement(wrappedChild, root, this); if (!Constants.hiddenTags.contains(child.tagName) &&