Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Browser is not started for @After method if it's declared in different class than the test itself #322

Open
oomelianchuk opened this issue Dec 12, 2024 · 0 comments · May be fixed by #325
Assignees
Labels
bug codeImplementationNeeded This issue requires a change in the code of Neodymium

Comments

@oomelianchuk
Copy link
Contributor

Quick Description

With the feature to start new browser for @after method if needed, we introduced this bug. Is seems that the reason is that we use method.getDeclaredClass() call to get the class to search the after methods in. Instead, we should use the actual test class that gets passed to this method.

Actual Behaviour

If @after method is declared in different class than the test itself, no webdriver is available in the method

Expected Behaviour

Test browser should be available for all @after methods, if nothing different is configured

Taks

  • Fix the issue
  • Introduce a unit test to prevent it in future
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment