Right now I am automating tests for an app using UIAutomation class. But my app has certain features which, I believe, can't be tested using just UIAutomation. For example, there is a feature that if a new contact is added to the addressbook, a popup is shown in the app. To test this feature a new contact needs to be added to the address book the popup should be checked. But UIAutomation automates user actions only within the target app. Can anyone tell me how can I automate these type of actions(preferably using scripts)?
i would recommend you automate with Sikuli. its mucvh easier to record and play. also u can any kind of alerts or popups
Related
I plan to make an iOS application in the future. How do you create a dialog like the one below on the iOS app? Like Android. Look at the screenshots.
Screenshots
UPDATE: my goal is to make users choose one of their emails to use for a login or register
Appium has a way to inspect the view hierarchy of an app using an inspector. I am interested in building one myself.
I know the overview answer of: it uses some webdriver to accomplish this. But how?
It puzzles me that a separate iOS app can some how communicate to another app, and show even its screen.
How does it work under the hood? or how does the iOS app communicate to the UI inspector to send its screen shots and hierarchy?
It puzzles me that a separate iOS app can some how communicate to another app, and show even its screen.
Yes! Apps should not be able to do this. But there exists a special kind of app, built just for testing, which IS able to do this.
The way this is done is using Apple's XCUITest framework. When you write an XCUITest in XCode, it builds a special app which is able to start your test app and then communicate with it using the XCUITest methods. These methods allow you to inspect elements in the view.
In order to create a view tree, you start at the root view and iterate over the children, building out a tree with a tree traversal.
Normally, the XCUITest app exits when your test script finishes, which means you won't be able to access it from a desktop app for viewing the tree as it updates. If you write your test script to run an infinite loop and open a network port for communication with an outside process, now you can build your viewer. This is exactly what Appium does, so I suggest you check out the appium source code and maybe just use that?
More information in this blog post
[edit]: Oh yeah, Appium uses Feacebook's WebDriverAgent project as the script that runs on the app. So WebDriverAgent is basically an XCUITest script which runs a server and can take commands during a test. Appium does a ton of work to bundle and package it into the special kind of companion app that is able to access your app, installs it on the iOS device, and then runs the test. WebDriverAgent has a command which iterates over the UIHierarchy and returns the whole tree.
I want to automate the UI flow on iOS, specifically below steps:
User taps on Settings
Opens WiFi options
Taps on the desired SSID
Enters Username and Password
Taps connect
Opens up a browser
I can do similar flow on Android with Android Debug Bridge. In Xcode Instruments, I don't see any WiFi options listed. Do we have any other tool to automate UI flow on iOS?
The standard is now to use UI Unit tests from XCode. Automation via instruments is deprecated (as far as I know).
However you can automate iOS itself, only the app you are testing. So accessing the settings like this will not work.
I'm also wondering why you need to test this. It's part of iOS and not your app. Therefore it's Apple's job to test it. You can just assume it works.
There is no way to do this on iOS. You may want to look into something like http://www.tapster.io.
Also ui_automation is remove from Xcode 8, so theres that.
I'm having pretty good luck with http://www.tapster.io
I'd like to integrate the Box OneCloud AppToApp framework into my application. The integration seems easy enough, but I can't see any way to test the application with the OneCloud app.
At the moment, my app appears in the Box app's "Open in..." menu (because it registers the appropriate mime type associations), but the BoxAppToAppAPIInfo information indicates that this isn't a BoxAppToAppRequest.
Does anyone have any pointers on how we go about testing this?
I need to develop a new app or code to simulate user interface in another already existing app and get textFields, messages, etc results. Something like KIF (https://github.com/square/KIF), but I would like it to be independently compiled (not embedded in the same project).
Any ideas?
If I understand correctly, you want to have App A to be able to interact with the UI of App B.
This is not possible.