Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

Webdriver browser instance remains open even after running all the tests while using webdriver.reusable property as true #437

Open
GuptaMegha opened this issue May 18, 2020 · 1 comment

Comments

@GuptaMegha
Copy link

Environment

Bobcat version:

Bobcat modules used:

  • bb-core
  • bb-aem-65
  • bb-junit5

Browser Chrome 81 version:

Expected Behavior

When webdriver.reusable = true
then Webbrowser should be closed afterAll the tests are ran.

Actual Behavior

Even after all the test are ran, a blank instance remain open.

Steps to reproduce

I need to reuse the AEM pages so I am creating pages in BeforeAll instead of BeforeEach and then creating separate tests for these pages and at the end I am deleting all the pages in AfterAll.

So I have to use webdriver.reusable property otherwise webdriver is getting closed after each test.

On using the property tests are running fine but at the end of the test webdriver browser instance remains open as Blank page.

@Arno804
Copy link

Arno804 commented Jul 15, 2020

Hello @GuptaMegha,

afaik, this is expected behavior with BobCat. I just can't find that snippet of documentation in the latest release.
However, please consider using WebDriverRegistry in order to close open webdriver instances.

If that is not working for you, I would recommend using the scenariocontext-pattern (https://github.com/Cognifide/bobcat/wiki/ScenarioContext), where you could store page information and using an after-hook to delete that pages.

Best,
Arno

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants