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

Winappdriver crashes when a child window is opened #1486

Open
shoaibmansoor opened this issue Mar 29, 2021 · 3 comments
Open

Winappdriver crashes when a child window is opened #1486

shoaibmansoor opened this issue Mar 29, 2021 · 3 comments

Comments

@shoaibmansoor
Copy link

Hi @DHowett @kat-y

I am using winappdriver 1.2 RC with appium to automate a windows application.
It works perfectly fine unless a child window opens up after several operations on the application.
As soon as the child window is opened up, getting a screenshot on that screen works but any other operation like find_element by any strategy or even getting page_source causes
Encountered element sharing the same runtimeId exception.

What are things I have tried:

  1. I read link and tried to downgrade to 1.1 but the issue was reproducible.
  2. I upgraded to v1.2.1, able to reproduce the same issue.
  3. I tried setting experimental capabilities appCapabilities.SetCapability("ms:experimental-webdriver", true) with all driver version combinations and the issue was still reproducible.
  4. Tried desktop session but the same runtime ids exception is being thrown.
  5. Using winappdriver with/without appium

Below are artifacts of my execution:
Execution Video: link
Execution log: link
Page Source: link

One important finding is that - if I perform all the steps manually (instead of using a script) I am able to get the page source but when I reach the child window by performing operations by writing script(includes click, sendkeys) then it throws the exception shared above. In my opinion, winappdriver somehow caches window elements, and when a child window opens up then runtime ids of the new screen clashes with cached element ids.

This has been a showstopper for me, I am unable to move ahead with this issue.
Kindly look into this issue and let me know if I can any provide some other information to resolve this issue.

Thanks
Shoaib Mansoor
[email protected]

@anunay1
Copy link

anunay1 commented Mar 31, 2021

Both your parent and the child window and the parent window elements have the same runtime id, you can save both the run time id and the use driver.FindElementById()

@shoaibmansoor
Copy link
Author

Hi @anunay1 Thanks for the reply.

May I ask how can I save runtime ids?
Even getting page_source on that screen causes winappdriver to crash.

@Shakevg
Copy link

Shakevg commented Dec 8, 2021

@shoaibmansoor Looks like it is a known issue in WinAppDriver #632

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

No branches or pull requests

3 participants