Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 99024

selenium webdriver wont start on certian cucumber tag's

$
0
0

I'm working on a Selenium Java test automation project, and I encountered a strange problem that I can't seem to understand the cause of.

The project configuration is as follows:

Selenium 4.28.1Gherkin 31.0.0Cucumber 7.21.0JUnit 4.13.2We use IntelliJ 2024.3.2 to run tests locally. On the cloud, we execute the test suite using the mvn command.

When I run the tests using the mvn command, I don’t encounter the problem. However, when I use the test runner in the IDE:enter image description hereSome tests won't run. For example, every time I include the tag @filter in the .feature file:enter image description here

(For tests that use the filter function) the WebDriver launches but never navigates to the siteURL. The browser stays stuck, and the test eventually fails.enter image description hereIt happens only with that tag, and I don't understand why.

The other day, I had the same problem when I tried changing the Scenario text in a feature file. Simply changing one letter, building, and running the test caused the same issue. However, when I reverted the change, it worked without any problems.

I hope someone can help me with this. Thank you!

FYI, deleting the tag after the test fails won't solve the problem. It's as if the test is permanently marked as using @filter and will never launch.

The only way to run the test using the IDE runner/debugger is to copy the scenario into another .feature file that doesn't have the @filter tag.


Viewing all articles
Browse latest Browse all 99024

Latest Images

Trending Articles



Latest Images