-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Selenium refuses to work, Playwright it shall be
- Loading branch information
Showing
4 changed files
with
72 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
logging.level.org.atmosphere = warn | ||
|
||
# To improve the performance during development. | ||
# For more information https://vaadin.com/docs/latest/integrations/spring/configuration#special-configuration-parameters | ||
# vaadin.whitelisted-packages= org/vaadin/example | ||
vaadin.whitelisted-packages=org/example,org/vaadin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package org.example; | ||
|
||
import com.microsoft.playwright.Browser; | ||
import com.microsoft.playwright.Page; | ||
import com.microsoft.playwright.Playwright; | ||
import org.junit.jupiter.api.BeforeAll; | ||
import org.junit.jupiter.api.Tag; | ||
import org.junit.jupiter.api.Test; | ||
import org.springframework.boot.test.context.SpringBootTest; | ||
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment; | ||
import org.springframework.boot.test.web.server.LocalServerPort; | ||
|
||
import static com.microsoft.playwright.assertions.PlaywrightAssertions.assertThat; | ||
|
||
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) | ||
@Tag("IntegrationTest") | ||
public class TrivialWebDriverTest { | ||
|
||
|
||
@LocalServerPort | ||
private int port; | ||
|
||
static Playwright playwright; | ||
|
||
@BeforeAll | ||
public static void setup() { | ||
playwright = Playwright.create(); | ||
} | ||
|
||
@Test | ||
public void smokeTest() { | ||
Browser browser = playwright.firefox().launch(); | ||
Page page = browser.newPage(); | ||
page.navigate("http://localhost:" + port + "/"); | ||
assertThat(page.getByText("Welcome }> add-on demo project")).isVisible(); | ||
} | ||
|
||
} |