Skip to content

Commit

Permalink
[GR-61698] Fix of SessionNotCreatedException and renamed toolbar elem…
Browse files Browse the repository at this point in the history
…ents.

PullRequest: graal/19963
  • Loading branch information
entlicher committed Feb 4, 2025
2 parents da0350d + 7c78d8d commit 352fe5a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ public static final class Actions {

public Actions(WebDriver driver) throws NoSuchElementException {
this.driver = driver;
WebElement toolbar = ExpectedConditions.presenceOfElementLocated(By.cssSelector("div.scripts-debug-toolbar")).apply(driver);
toolbarButtons = toolbar.getShadowRoot().findElements(By.cssSelector("button.toolbar-button"));
WebElement toolbar = ExpectedConditions.presenceOfElementLocated(By.cssSelector("devtools-toolbar.scripts-debug-toolbar")).apply(driver);
toolbarButtons = toolbar.findElements(By.cssSelector("devtools-button.toolbar-button"));
if (toolbarButtons.size() < Action.values().length) {
throw new NoSuchElementException("Insufficient numebr of toolbar buttons: " + toolbarButtons.size() + " expecting " + Action.values().length);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ private static WebDriver createDriver(String chromeBin, String chromeVersion) {
ChromeOptions options = new ChromeOptions();
options.setBinary(chromeBin);
options.setBrowserVersion(chromeVersion);
options.addArguments("--headless=new");
options.addArguments("--no-sandbox");
options.addArguments("--headless");
System.err.println("Creating driver using options: "+options);
WebDriver driver;
try {
Expand Down

0 comments on commit 352fe5a

Please sign in to comment.