xcode-ui-testing

Xcode UI Testing Error keyboard

假如想象 提交于 2021-01-31 07:27:09
问题 XCUIApplication *app = [[XCUIApplication alloc] init]; [app.buttons[@"Committee"] tap]; [app.buttons[@"Login"] tap]; [app.buttons[@"Add Presenter"] tap]; XCUIElement *nameTextField = app/*@START_MENU_TOKEN@*/.textFields[@"Name"]/*[[".scrollViews.textFields[@\"Name\"]",".textFields[@\"Name\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/; [nameTextField tap]; [nameTextField typeText:@"A"]; XCUIElement *topicTextField = app/*@START_MENU_TOKEN@*/.textFields[@"Topic"]/*[[".scrollViews.textFields[@\

Xcode UI Testing Error keyboard

こ雲淡風輕ζ 提交于 2021-01-31 07:23:47
问题 XCUIApplication *app = [[XCUIApplication alloc] init]; [app.buttons[@"Committee"] tap]; [app.buttons[@"Login"] tap]; [app.buttons[@"Add Presenter"] tap]; XCUIElement *nameTextField = app/*@START_MENU_TOKEN@*/.textFields[@"Name"]/*[[".scrollViews.textFields[@\"Name\"]",".textFields[@\"Name\"]"],[[[-1,1],[-1,0]]],[0]]@END_MENU_TOKEN@*/; [nameTextField tap]; [nameTextField typeText:@"A"]; XCUIElement *topicTextField = app/*@START_MENU_TOKEN@*/.textFields[@"Topic"]/*[[".scrollViews.textFields[@\

UI Tests: Simulate a shake gesture with Swift

老子叫甜甜 提交于 2021-01-27 03:52:36
问题 Using UI tests, I'd like the app to respond to shake gestures, and I would like to programmatically trigger a shake gesture in my swift UI tests. Triggering the shake gesture while recording during a UI test session yields no added code. Is there a way to do this? Thanks in advance! 回答1: As far as I know, currently you cannot do it directly from XCUITest. So instead, maybe programmatically call it using launch arguments that then call the relevant section of the code to simulate the gesture.

Xcode UI Test environment variables not being passed from Scheme

a 夏天 提交于 2020-11-29 04:23:58
问题 In Xcode 9.2, for my iOS app, I have a Scheme for running my UI Test suite. In this scheme, under the "Test" tab, I have both environment variables and arguments defined. When my tests run, these variables aren't available to my app code. However, I am able to programmatically set both the arguments and the launchEnvironment in the test code, and those ones are available to the app while it's running under test. I also have environment variables and arguments set in the "Run" tab, and those

run all test classes in xcode ui test

我怕爱的太早我们不能终老 提交于 2020-08-11 22:27:04
问题 i am completely new to xcode ui application test. i have the source of the ios app. But i have to test the app using xcode ui test. currently i am adding new test classes to my ui test by creating new file and adding test cases by recording. I can run my test class individually. But i want to execute all my test classes at a time. How i can do this. I am completely new in this domain. Any kind of help will be appreciated. U can also give me a ui test project link or any link which can help me