This text is not correct in my case: After seeing ---- reset.sh completed successfully ----, you’ll find UICatalog.app at this location: /appium/sample-code/apps/UICatalog/build/Release-iphonesimulator/UICatalog.app
I found the apps as zipped files under ./appium/assets
So I unzipped them and updated the appium.txt accordingly.
Now, I’ve started node . in one window and ran ‘arc’ in another window.
However, arc fails with this reponse
/Users/andreheijstek/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/gems/selenium-webdriver-2.48.1/lib/selenium/webdriver/remote/response.rb:73:in `assert_ok’: status code 500 (Selenium::WebDriver::Error::ServerError)
Alright,
I just went through this tutorial again myself, and I’m able to confirm that this works.
I Assume that you have the latest appium installed successfully.
My backup plan is to complie this using the Xcode UI. I’m picking iPhone 5S.
Once the build is successful, it will show up in your Derived Data directory > UICatalog > Build > Products > Debug… > UICatalog.app I’m attaching a screen shot for navigational purposes.
Eric
gives me 12 cells. But there are more cells in my app, which are not visible without scrolling.
The rest of the code works nicely, it clicks through all 12 cells. But obviously does not click the cells out of view.
How should I get the other cells as well?
It kind of makes sense though, the text on my app does not contain the text ‘various use of UIButton’, so it seems obvious that this text cannot be found.
Your code to get all elements does not work with me.
This is what I get:
Ah, You are using UI Catalog.
Basically you have a choice of either finding element by uiautomation or xpath. Both have their advantages. UIAutomation is going away in about 6 months so xpath may be useful?
In any case, this should work.
Find the number of elements. This should count items offscreen for iOS.
find_elements(:xpath, “//UIATableView[1]/UIATableCell”).size
For each count iterate on the elements and find the text entry. Here we get the first one. Use your iteration counter and loop through accordingly.
find_elements(:xpath, “//UIATableView[1]/UIATableCell/UIAStaticText[1]”).map {|e| e.text}