ios-ui-automation

Simulator timed out issue while running UIAutomation in iOS

核能气质少年 提交于 2019-12-12 17:26:59
问题 I am running UIAutomation scripts. Some times script executes successfully while other times it crashes saying Simulator session timed out and this message is also at different interval. If I have for loop while executing script, then somes it executes thrice, sometimes till 10 iteration some time even till 25th iteration & in between it creases with above alert. 来源: https://stackoverflow.com/questions/9171065/simulator-timed-out-issue-while-running-uiautomation-in-ios

How to continue testing an iOS app, using UIAutomation instrument, even after the app exits?

一笑奈何 提交于 2019-12-12 08:49:52
问题 I have an app. There is a button in the app, which, if clicked, exits the app. I am testing the app using UIAutomation instruments. I want to test this button. But after the app exits, the instrument stops giving an exception. What I want to do is that after the app exists, I want to reopen the app and continue with the rest of the test. Have anyone else been in the same scenario? If so, can you please share the solution, if you have found any? 回答1: This is not possible because Instruments

performTaskWithPathArgumentsTimeout in XCTest?

陌路散爱 提交于 2019-12-12 02:56:58
问题 Does the new way of UI testing with Xcode have a method like performTaskWithPathArgumentsTimeout? Ultimately, how can I Check Email during Xcode UI Testing? 回答1: It does not. I've scraped the framework's headers to put together some unofficial documentation and it's not present. 来源: https://stackoverflow.com/questions/35678717/performtaskwithpathargumentstimeout-in-xctest

Difference between delay and pushTimeout(), popTimeout() in UIAutomation iOS

大兔子大兔子 提交于 2019-12-12 00:37:12
问题 What is the difference between app.delay(20); tableViewCell.waitForInvalid(); and app.pushTimeout(20); tableViewCell.waitForInvalid(); UIATarget.localTarget().popTimeout(); In the second case, in case if the cell becomes invalid in say 2secs, then will it still wait for 18secs and then continue or just continue after 2secs ? In the first case, it is waiting until 20secs. 回答1: No, the second case is preferred because it will wait up to 20 seconds for the cell to become invalid. The first case,

XCode 5.0.1: can you run automated UI scripts in Instruments?

我的梦境 提交于 2019-12-11 17:34:46
问题 After upgrading to 5.0.1, I'm unable to run UI scripts and get the following message: An error occurred while trying to run the script. Furthermore, recording (the bottom red button) doesn't work either. Is it the only solution to wait for Apple to fix it? Is there a way to downgrade to 5.0? 回答1: i had the same problem, and you should look at this link: https://groups.google.com/forum/#!topic/zucchini-discuss/fQNrfOTaIuU this is what Thomas W. said, and it totally solved my problem: "It is

Tap on absolute coordinates

雨燕双飞 提交于 2019-12-11 14:44:21
问题 I'm trying to perform a tap on custom NavigationBar that is instantiated with a view. As I seem to be not able to select it first and then tap, I wanted to perform a tap using custom coordinates (element is in the upper left corner): UIATarget.localTarget().frontMostApp().tapWithOptions({tapCount: 1, touchCount: 1, duration: 0.1, tapOffset: {x: 0, y: 0}); Unfortunately it looks that the origin of the tap (0,0) is right below the NavigationBar element and I'm not able to tap on this element as

UIAutomation, UITableView inside UITableViewCell

二次信任 提交于 2019-12-11 11:42:15
问题 I have a horribly coded set of controllers which I am unable to refactor at this time. I need to bring them under automated testing, but have run into an issue with the UIAutomation tool. These controllers are dynamically generated. There were many ways to do this but somebody decided it would be best if they made a tableview containing cells which each contain more tableviews, containing the cells that the user will see and interact with. A simple example of one of these controllers is as

XCUIApplication replacements for UIATarget captureScreenWithName()

淺唱寂寞╮ 提交于 2019-12-11 06:38:40
问题 We are trying to migrate from UIAutomation to XCUITests and did use the captureScreenWithName() API to programmatically generate screen shots. What is the replacement in the XCUITests ? (I know that automatically screenshots are taken in case of error, but we have a special test which runs forever in a loop and evaluates QA click,tap commands via network similar to the appium-xcuitest-driver https://github.com/appium/appium-xcuitest-driver) Do I need to rip out private headers (XCAXClient_iOS

Tap command on a button not working in UIAutomation

爷,独闯天下 提交于 2019-12-11 04:19:10
问题 I have this button in an app. I want to simulate a tap on the button. The button is located as follows: target>frontMostApp()>windows()[0]>buttons()[2]. My javascript code is as follows: target.frontMostApp().windows()[0].buttons()[2].tap(); But after running the code, the following error message is shown: Error: target.frontMostApp().windows()[0].buttons()[2] could not be tapped I have checked that the accessibility label of this button is set to enabled. Can anyone tell me what I am doing

How to deal with the “_APPNAME_ Would Like to Use Your Current Location” alert through UIAutomation

ε祈祈猫儿з 提交于 2019-12-10 14:58:19
问题 Ok, this is driving me nuts. I've got a little CI-build system running. And I'm doing UI testing of my application with UIAutomation. Since the application uses CoreLocation, the first time the application is launched I get a little alert asking me to confirm that I want my location tracked. This would be great and all, but the alert is not part of my own application and I can't use UIAutomation to interface with it. Is there any solution to confirming this alert without manual taping of the