fsprojects / Canopy.Mobile

Canopy testing framework for mobile apps
https://fsprojects.github.io/Canopy.Mobile/
MIT License
14 stars 12 forks source link

Fix for #23 Allow to select edit boxes #24

Closed lefthandedgoat closed 7 years ago

lefthandedgoat commented 7 years ago

2 things: First the timeout on exists was set to 0, which makes sense but does not actually work. I bumped it to 1.0, maybe 0.1 will work, not sure, but 0.0 does not work at expected.

The other part was that the selector you wanted was an id but it was not an android:id. It was an io.appium.android.apis:id so I adjusted the selector to be less specific.

Unfortunately appium does not support XPath 2.0 or I could have used ends-with instead I cheesed it with contains, which is not technically correct but 'good enough' I hope.

lefthandedgoat commented 7 years ago

Oops I merged my own thing. Sorry.

I want to add that holy cow working with appium is a pain in the ass. I spent like 4 hours trying to get the 'viewer' thing working so I could attach to a VM and find selectors. I ended up breaking everything and had to reinstall it (works with LTS node but not new node btw), and resorted to printfn different properties to figure this out.

This knowledge will help me with the suggestions thing (I've been vegging out all break)

forki commented 7 years ago

I also tried that with the match on resource-id but it still fails when uncomment the Expect.isTrue (exists "#txt_query_prefill" ) "Text is available" line

forki commented 7 years ago

does that work for you?

forki commented 7 years ago

scratch that. it works. there was another issue. thanks.