Skip to content

Commit

Permalink
debug load extension path
Browse files Browse the repository at this point in the history
  • Loading branch information
ferpasri committed Nov 19, 2024
1 parent b2eaa4c commit 3dfa3ed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -68,10 +65,13 @@ else if (result instanceof Map) {
packedBody = (Map<String, Object>) 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);
Expand Down

0 comments on commit 3dfa3ed

Please sign in to comment.