SharpAdb / AdvancedSharpAdbClient

AdvancedSharpAdbClient is a .NET library that allows .NET, Mono and Unity applications to communicate with Android devices. It's improved version of SharpAdbClient.
https://sharpadb.github.io
Apache License 2.0
203 stars 54 forks source link

Need help for Implicit and Explicit wait in AdvancedSharpAdbClient #20

Closed nishikantkamble closed 2 years ago

nishikantkamble commented 2 years ago

What can we do for you?

While working with AdvancedSharpAdbClient , for android element automation, sometimes few elements not loaded properly, or the elements configuration not matches, so there may be the any reason, so for that we want to wait for the element will appear or something like wait.until(ExpectedConditions.visibilityOf()), so for that we want explicit wait. So I request if anything is already then it will be good or plz suggest the solution for this. Advance Thanking you...

wherewhere commented 2 years ago

I think this is a feature request which need use this template... (Why everyone use help-wanted template to create issues. 😂😂😂

yungd1plomat commented 2 years ago

Yes, this feature is already implemented, you can specify the waiting time with the third argument

// Wait for element 5 second and return null if element not found
Element el = client.FindElement(device, "//node[@text='Login']", TimeSpan.FromSeconds(5));