Questions tagged [selenium-jupiter]

JUnit 5 extension for Selenium

On the one hand, JUnit 5 is the next generation of the well-known testing framework JUnit. Jupiter is the name given by the JUnit team to the new programming and extension provided by JUnit 5. This extension model provides the ability of incorporate extra capabilities for JUnit 5 tests.

On the on other hand, Selenium WebDriver is another testing framework which allows to control browsers (e.g. Chrome, Firefox, and so on) to carry out automated testing of web applications.

Selenium-Jupiter is a JUnit 5 extension aimed to provide seamless integration of Selenium (WebDriver and Grid) within JUnit 5 tests.

19 questions
115
votes
19 answers

Junit 5 - No ParameterResolver registered for parameter

I can write up and execute Selenium script without any special test framework but I wanted to use Junit 5 (because we have dependency with other tools) and I have never seen such error org.junit.jupiter.api.extension.ParameterResolutionException…
Mike ASP
  • 2,013
  • 2
  • 17
  • 24
6
votes
2 answers

How to pass gradle systemProperties JUnit5 tests?

I am using gradle 3.5 and Unit 5 (jupiter). I wish to pass System property to my tests, in order to configure the test I am running the test using this command gradle test -Denv=envFile1 Here is my gradle file : buildscript { repositories { …
Shay_t
  • 163
  • 1
  • 16
4
votes
1 answer

How to programmatically configure WebDriver in base class in Selenium Jupiter?

I want to migrate existing Selenium-Tests based on JUnit 4 to JUnit 5. For this purpose, I want to make use of Selenium-Jupiter. One requirement, that the tests must fulfill is, to be able to switch the WebDriver implementation at runtime - based on…
4
votes
1 answer

Combine @TestTemplate with @ParameterizedTest?

How can we use Selenium-Jupiter's @TestTemplate (to have it run with different browsers: https://bonigarcia.github.io/selenium-jupiter/#template-tests ) to combine it with @ParameterizedTest (for data-driven testing, e.g. try different credentials,…
DieterR
  • 41
  • 2
2
votes
3 answers

How to use different webdrivers based on environment

I use selenium-jupiter. I am getting a webdriver from method arguments like this: @Test public void testWithChrome(ChromeDriver chromeDriver) { chromeDriver.get("someUrlHere"); } Now I want to run tests on grid so I need to use webdriver…
1
vote
1 answer

How can selenium-jupiter be used with Karate to automatically use the WebDriver matching the currently installed Chrome/Firefox etc.?

Background Selenium-Jupiter is a JUnit 5 extension aimed to ease the use of Selenium WebDriver by downloading and caching the WebDriver binaries required for each test, depending on which locally installed web browser is to be used. It does this by…
1
vote
1 answer

Selenium-Jupiter generic webdriver settings not applied

I want to use Selenium-Jupiter in my Spring Boot Project but my requirement is to switch the WebDriver implementation at runtime - based on the execution environment - using one common base class for all tests. I already checked this post and this…
1
vote
1 answer

Standard approach for multi browser test execution in Selenium Jupiter

I went through Selenium Jupiter manual and still cannot get the idea of how I can set multiple browsers in Selenium Jupiter to run every test in every browser. Should use Test Template for that purpose? Again I did not see an example of how can I…
Paulus
  • 138
  • 1
  • 11
0
votes
1 answer

Selenium-jupiter - passing timeout in browsers.json

I am trying to write selenium tests using Selenium-Jupiter. My team has decided to go with @TestTemplate approach and to use browsers.json. One thing we feel we need to do is alter the default timeouts. I have read on the selenium documentation that…
Kreweta
  • 65
  • 1
  • 1
  • 6
0
votes
1 answer
0
votes
1 answer

Gitlab CI ParameterResolutionException Failed to resolve parameter

I have test case that works fine in my local eclipse environment. @Test @Order(1) void testTitle(@Arguments("--headless") ChromeDriver driver) { driver.get("https://google.com"); driver.manage().timeouts().implicitlyWait(5,…
0
votes
1 answer

How can I get container ID in order to execute command in docker container?

I only seem able to use getContainerId(WebDriver) during the first test. Every subsequent test returns empty e.g. getContainerId(SelenideDriver.getWebdriver) Ideally I need to be able to execute commands in the docker browser container (for…
0
votes
1 answer

How to configure Selenide remote grid url in Selenium-Jupiter test framework?

I am trying to configure a Selenide driver within the Selenium-Jupiter framework, to use my remote grid url but it keeps ignoring the configuration, and just runs the local installed browser. Here is how I am trying to configure it. Any idea…
djangofan
  • 28,471
  • 61
  • 196
  • 289
0
votes
1 answer

How to set browser arguments conditionally (Selenium-Jupiter specific)

I have tried so many things to set the proxy in a chrome-in-docker browser. I finally found something that works, but it isn't the best solution. @BeforeEach public void beforeEach(@Arguments("--proxy-server=server:portNum") WebDriver driver) { …
Michiel Bugher
  • 1,005
  • 1
  • 7
  • 23
0
votes
1 answer

How can I run Grid up and running

Is it possible to run the hub and nodes in Selenium Grid through Java/Selenium code? In an example provided by @Boni Garcia, there is GridLauncherV3 but this is not working with Selenium-jupiter version 3.2.1. Can you please help? // Start hub …
1
2