Skip to content

Commit

Permalink
chore: use --headless=new argument
Browse files Browse the repository at this point in the history
  • Loading branch information
manolo committed Aug 7, 2023
1 parent e34bd82 commit 43450aa
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ You can also verify the project in production mode by running:

mvn verify -Pproduction

Or deploy the deploy the application in production executing:
Or deploy the application in production executing:

mvn jetty:run-war -Pproduction

Expand All @@ -56,4 +56,4 @@ The screenshot comparison example in `src/test/java/com/vaadin/testbenchexample/
JUnit5 is supported since TestBench 9, examples can be found at `src/test/java/com/vaadin/testbenchexample/junit5`.

### TestBench together with Selenium-Jupiter
It is possible to use TestBench together with <a href="https://bonigarcia.dev/selenium-jupiter/">Selenium-Jupiter JUnit5 extension</a>, see example test at `src/test/java/com/vaadin/testbenchexample/junit5/SimpleCaseSeleniumIT`.
It is possible to use TestBench together with <a href="https://bonigarcia.dev/selenium-jupiter/">Selenium-Jupiter JUnit5 extension</a>, see example test at `src/test/java/com/vaadin/testbenchexample/junit5/SimpleCaseSeleniumIT`.
2 changes: 1 addition & 1 deletion src/test/java/com/vaadin/testbenchexample/AbstractIT.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public abstract class AbstractIT extends TestBenchTestCase {
public void setUp() throws Exception {
ChromeOptions options = new ChromeOptions();
if (Boolean.getBoolean("com.vaadin.testbench.Parameters.headless")) {
options.addArguments("--headless");
options.addArguments("--headless=new");
}
setDriver(TestBench.createDriver(new ChromeDriver(options)));
getDriver().get("http://" + IPAddress.findSiteLocalAddress() + ":8080");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public abstract class AbstractJUnit5IT extends BrowserTestBase implements Driver
public WebDriver createDriver() {
ChromeOptions options = new ChromeOptions();
if (Boolean.getBoolean("com.vaadin.testbench.Parameters.headless")) {
options.addArguments("--headless");
options.addArguments("--headless=new");
}
return TestBench.createDriver(new ChromeDriver(options));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class SimpleCaseSeleniumIT implements HasElementQuery {

@BeforeEach

public void beforeEach(@Arguments("--headless") ChromeDriver driver) { // driver injection by Selenium
public void beforeEach(@Arguments("--headless=new") ChromeDriver driver) { // driver injection by Selenium
this.driver = TestBench.createDriver(driver); // TestBench driver proxy
this.driver.get("http://" + IPAddress.findSiteLocalAddress() + ":8080");
}
Expand Down

0 comments on commit 43450aa

Please sign in to comment.