2gis / Winium.Desktop

Winium.Desktop is Selenium Remote WebDriver implementation for automated testing of Windows application based on WinFroms and WPF platforms.
Mozilla Public License 2.0
402 stars 140 forks source link

Multiple windows switching issue #296

Open PritamGit opened 5 years ago

PritamGit commented 5 years ago

I am automating an application where I have 5 child windows. I need to switch to these child windows often for different scenarios. Below is the issue that I am observing, which is making my scripts failed.

  1. Window handles string changes every time we launch a new session of the application. So I am unable to use window handles string for scenario where I need to relaunch the session
  2. In a session, the index of the window handles for child changes depends upon which child window I switch. For e.g child window handles before I switch: Window[0] - Child 1 Window[1] - Child 2 Window[2] - Child 3 Window[3] - Child 4 Window[4] - Child 5 After I switched to say Child 3 and returned back to parent window, and if I again try to get child window handles to switch to Child 1, the sequence of the window handle index changes as below

Window[0] - Child 3 Window[1] - Child 1 Window[2] - Child 2 Window[3] - Child 4 Window[4] - Child 5

And so on.

How to handles window switching effectively so I can switch to my desire child window at any given point in time. How do I know what is the current index of my desire child window. Pleaee help. Any suggestion or ideas are welcome.

ayushigarg056 commented 3 years ago

Hi

I am facing the same issue with my desktop application and unable to find any relevant answer regarding the same If anyone could please help to automate the above issue.