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

The Session::reset closes main window, when window was renamed #25

Open
aik099 opened this issue Apr 6, 2024 · 0 comments · May be fixed by #27
Open

The Session::reset closes main window, when window was renamed #25

aik099 opened this issue Apr 6, 2024 · 0 comments · May be fixed by #27

Comments

@aik099
Copy link
Member

aik099 commented Apr 6, 2024

How to reproduce:

  1. start a session either by calling the Session::visit
    • an empty window is opened with an empty window.name (because no URL is opened yet)
    • initial window handle becomes w3cwh:{selenium_window_handle_here}
    • the page URL is visited
    • the page sets it's window.name to the desired value
  2. open some other popups from that page
  3. call the Session::reset:
    • the Session::swithToWindow() works correctly, because it uses selenium-handle-based window identifier
    • code, that cycles through the opened windows isn't identifying an initial window (because it has a different name) and such and is closing it

For now the only option, that might work is to consider 1st opened window as initial (the 1st window handle returned) and never close it.

Related issue: #26

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

Successfully merging a pull request may close this issue.

1 participant