microsoft / WinAppDriver

Windows Application Driver
MIT License
3.68k stars 1.4k forks source link

Does WinAppDriver support waiting for an element visible on UWP? #329

Closed higarry closed 6 years ago

higarry commented 6 years ago

Recently, I am using Appium+WinAppDriver to do UI testing for my UWP applications, but I encountered an issue: I am not able to know when does my APP has done some UI changes, I failed to find some functions like WebDiverWait which is used on WebDriver. So there are some functions like WinDriverWait ? Or do some one has a good way to do this to wait for some element become visible? Thanks

higarry commented 6 years ago

Any update?

timotiusmargo commented 6 years ago

Hi @higarry,

By WebDriverWait, did you mean the explicit wait defined in the Selenium document below? http://www.seleniumhq.org/docs/04_webdriver_advanced.jsp#explicit-waits

If so, such implementation should reside on the local end/client side such as appium-dotnet-driver for C# etc. We should definitely bring this issue up in those repositories. This feature would poll for the expected condition behind the scene using JSON wire protocol commands that Windows Application Driver have already supported.

higarry commented 6 years ago

hi @timotiusmargo,

Yes, explicit wait is what I mean. I installed Appium package on my desktop, and added the following namespace line: using OpenQA.Selenium.Appium; Like you mentioned, WinAppDriver already supported this, could you please specify the functions? or are there are samples ?

Thanks!

timotiusmargo commented 6 years ago

Hi @higarry,

Sorry for not being completely clear. Selenium explicit wait requires the client code like appium-dotnet-driver to implement it for you. If your test script is written in C#, you would very likely use appium-dotnet-driver to translate your script to JSON Wire Protocol commands that Windows Application Driver understand. Last time I checked, appium-dotnet-driver is missing support for the explicit wait we talked about. Hence, you should bring this issue up in their GitHub repository. Once it is implemented on appium-dotnet-driver, it will work with Windows Application Driver without any changes needed on our side.

hassanuz commented 6 years ago

Marking issue as closed due to no additional comments.

schrdori commented 4 years ago

I am also having trouble with waiting for and finding elements. working with c# and WebDriverWait SeleniumExtras.WaitHelpers.ExpectedConditions.ElementExists(By.Name(title) for example is not finding elements if they tend to "pop up" while waiting for them. Is this an issue for appium-dotnet-driver repos or here?

Take-A-Byte commented 2 years ago

@schrdori I am facing the sort of similar issue. Did you find any solution to this?

schrdori commented 2 years ago

@schrdori I am facing the sort of similar issue. Did you find any solution to this?

Sadly not. A workaround could be to add a manual delay before searching.

but i have stopped working with WinAppDriver 2 years ago due to lack of updates.

liljohnak commented 2 years ago

@schrdori what are you using? And how do you like it?

schrdori commented 2 years ago

@liljohnak i am using Ranorex. It is pretty expensive but also pretty good. Comes with an already implemented framework and its own IDE. Also fully C# compatible. I like it a lot.

Only thing is thier Support Team, can take quite a while to get a response and sometimes it feels like they didnt really read it… but if you insist you get an answer.