I’m currently trying out the javascript clients for testing an android app.
With wd I found the function “waitForElementById” to wait until an element is available.
As the webdriverio client seems better documented and is used in the getting started example I would like to give it a chance. But basically without a stable way to wait until I can actually interact with elements I don’t see any way how to get ANY test done.
I would think something like:
Click button
assert new activity is opened
Do something there: for example entering text to a field
assert that text was entered
is an absolute basic test case for any application (web, android, ios,…) so I can’t believe it isn’t available.
But for that its vital to wait for the element of 1. and 3. to be loaded, else any attempt to locate that element would fail the test (because it just isn’t there yet)
So: How to wait for an element with webdriverio?
As a side question: Is there any decent documentation on the javascript clients in conjunction with appium? I’m guessing my way for at least 3 days now.
I feel the same way. Did you ever find any good tutorials?
Like you, I’ve been guessing what to do. I found that Browserstack tutorial helpful. But I’m surprised at how hard it is to find other guides for using Webdriverio to test an Android app.
Hi @Ross1, welcome on board.
Good tutorials are hard to find, probably because everyone seems to think they know how to use this tool so they go and blog with titles like “Top 10 tips”, and get all the google hits, but actually don’t warn you how hard it is to use these tools. You gotta pay for good content, or you gotta do the time to learn abotu explicit an implicit waits. I prefer explicit, and I build my wrapper objects around explicit waits.
Mainly because if you use implicit waits, negative test cases become almost impossible to write. Out of box, that’s what 90% of users want, positive happy-path. And then they find they have to re-write all of their test code suddenly when they start negative test case writing.