diff --git a/webdriver/src/org/testar/monkey/alayer/webdriver/WdDriver.java b/webdriver/src/org/testar/monkey/alayer/webdriver/WdDriver.java index d2f71ceeb..9cb3613c1 100644 --- a/webdriver/src/org/testar/monkey/alayer/webdriver/WdDriver.java +++ b/webdriver/src/org/testar/monkey/alayer/webdriver/WdDriver.java @@ -176,6 +176,9 @@ private static RemoteWebDriver startChromeDriver(String chromeDriverPath, .usingAnyFreePort() .build(); ChromeOptions options = new ChromeOptions(); + + System.out.println("--load-extension=" + extensionPath); + options.addArguments("--load-extension=" + extensionPath); options.addArguments("--disable-infobars"); if(fullScreen) { diff --git a/webdriver/src/org/testar/monkey/alayer/webdriver/WdStateFetcher.java b/webdriver/src/org/testar/monkey/alayer/webdriver/WdStateFetcher.java index 25a87e519..d51a1ccac 100644 --- a/webdriver/src/org/testar/monkey/alayer/webdriver/WdStateFetcher.java +++ b/webdriver/src/org/testar/monkey/alayer/webdriver/WdStateFetcher.java @@ -54,9 +54,6 @@ public static WdRootElement buildRoot(SUT system) throws StateBuildException { Object result = WdDriver.executeScript( "return getStateTreeTestar(arguments[0])", Constants.ignoredTags); - System.out.println("DEBUG JavaScript extension: " + result.getClass().getName()); - //System.out.println("DEBUG JavaScript extension (getStateTreeTestar(arguments[0])): " + result.toString()); - // TODO As Edge limits its recursion to 20, we need to flatten the tree in JS // And unflatten the list here into a nested Map (as produced by Chrome / FF) // https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/18531786/ @@ -68,10 +65,13 @@ else if (result instanceof Map) { packedBody = (Map) result; } else { - System.out.println("DEBUG JavaScript extension: packedBody is neither List or Map"); + System.out.println("DEBUG JavaScript extension: packedBody is null or neither List or Map"); return emptyRootState(system); } + System.out.println("DEBUG JavaScript extension: " + result.getClass().getName()); + //System.out.println("DEBUG JavaScript extension (getStateTreeTestar(arguments[0])): " + result.toString()); + System.out.println("DEBUG JavaScript extension (packedBody size): " + packedBody.size()); WdRootElement wdRoot = new WdRootElement(packedBody);