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

[mobile] Added enhancements for wait API for mobile UI #1550

Merged
merged 2 commits into from
Apr 11, 2021
Merged

[mobile] Added enhancements for wait API for mobile UI #1550

merged 2 commits into from
Apr 11, 2021

Conversation

babusekaran
Copy link
Contributor

@babusekaran babusekaran commented Apr 10, 2021

Approach:
created a mobile-specific options MobileDriverOptions to override functions according to mobile driver needs

Added enhancements for below wait APIs to ensure it works for mobile,

  • waitFor(locator)
  • waitForAny([locator1, locator2,... locatorN])
  • waitForText(locator, text)

Bonus changes:

  1. changes to support other relevant APIs on mobile like retry(), optional(), exists(), clear()
  2. added wait related examples to mobile-test and points to updated demo app.

only waitUntil(function) is expected to work for mobile, other overload for waitUntil() may work for mobile-web but not supported on mobile apps.

…ll only support waitUntil(func). changed logic for optional and waitForAny for mobile
@ptrthomas ptrthomas merged commit a9ccfc6 into karatelabs:develop Apr 11, 2021
@babusekaran babusekaran deleted the appium/wait-api-for-mobile branch April 11, 2021 10:26
@bltemrah
Copy link

Hi,
Firstly, thank you for your update and effort. Please, can you let us know how we can get it to our local? Do we need to change the karate version in dependency? Is it now in the master branch? or develop one?

Thanks
Emrah

@babusekaran
Copy link
Contributor Author

@bltemrah Yes, the changes are available in develop branch you can follow the steps in https://github.com/intuit/karate/wiki/Developer-Guide to build and use it locally.

Once you built it locally change your karate version in dependency to develop branch version which is 2.0.0

@bltemrah
Copy link

Thanks for your prompt reply. I use Karate Fw by maven dependency in pom XML. I think that I need to wait your version update. Can you please let me know when you update version?
Thanks

@ptrthomas
Copy link
Member

@bltemrah if you can't build locally and test - we won't have the confidence to release an official version sooner. so right now there is no confirmed date. we will have to wait for others to confirm

@bltemrah
Copy link

@ptrthomas we would like to test it.

@ptrthomas
Copy link
Member

@bltemrah great ! please do

@bltemrah
Copy link

Hi @babusekaran and @ptrthomas
We have applied "waitFor" in our test. It seems that it works well. Please note that we have not used "waitForAny" and "waitForText" yet.
Thanks

@ptrthomas
Copy link
Member

@bltemrah thanks. please note that the more gaps we discover now saves everybody time

@bltemrah
Copy link

@ptrthomas @babusekaran we did also a test of "waitForText", and it works well, fyi.

@bltemrah
Copy link

Please, can you let me know when you update the dependency?

@babusekaran
Copy link
Contributor Author

@bltemrah a release candidate is available now with these changes, pls try 1.1.0.RC1 in your dependency.

@bltemrah
Copy link

Hi @babusekaran,
I have checked https://mvnrepository.com/search?q=karate to find 1.1.0.RC1, but I could not it. Can you make it clear to me how I get it?
Thanks

@ptrthomas
Copy link
Member

@bltemrah mvnrepository is not up to date: https://search.maven.org/artifact/com.intuit.karate/karate-core

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 this pull request may close these issues.

3 participants