This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let textField = app.textFields[""input user name textField.tap() | |
textField.typeText("abc") | |
app.buttons["start"].tap() | |
let querry = app.otherElements["identifier_any_uicontroll"] | |
if querry.waitForExistence(timeout: timeOut) | |
{ | |
//do something else | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.pickerWheels.element(boundBy: 0).adjust(toPickerWheelValue: "17") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func testMoveToOtherScreen() { | |
_ = tapOnButtonInCell(atPosition: 0) | |
XCTAssert(app.navigationBars["Other Screen:"].exists) | |
} | |
func tapOnButtonInCell(atPosition: Int) -> XCUIElement { | |
let cellQuerry = app.tables.cells.element(boundBy: atPosition) | |
cellQuerry.buttons["buttonOther"].tap() | |
return cellQuerry | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func testMoveToFlowerSrceen() { | |
app.tables.cells.staticTexts["Flower"].tap() | |
XCTAssert(app.navigationBars["Flower Screen"].exists) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func testMoveHomeScreen() { | |
app.buttons[startTest].tap() | |
XCTAssert(app.navigationBars["HomeScreen"].exists) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func testLoginWithPasswordAndUserName() { | |
let textField = app.textFields["input user name"] | |
textField.tap() | |
textField.typeText("user name") | |
let secureTextFields = app.secureTextFields[inputPassword] | |
secureTextFields.tap() secureTextFields.typeText("pass123") | |
app.buttons["login"].tap() | |
XCTAssert(app.buttons["startTest"].isEnabled) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func testLoginWithEmptyUserNameAndPassword() { | |
let secureTextFields = app.secureTextFields["input password"] | |
secureTextFields.tap() secureTextFields.typeText("pass123") | |
app.buttons["login"].tap() | |
XCTAssert(app.alerts.element.staticTexts["pass is correct"].exists) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func testRegisterWithUserName() { | |
let textField = app.textFields["input user name"] | |
textField.tap() | |
textField.typeText("user name") | |
app.buttons[register].tap() | |
XCTAssert(app.alerts.element.staticTexts["user is correct"].exists) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override func draw(_ rect: CGRect) { | |
// Add ARCs | |
self.addCirle(innerCircleRadius, capRadius: 20, color: self.firstColor) | |
self.addCirle(middleCircleRadius, capRadius: 20, color: self.secondColor) | |
self.addCirle(outerCircleRadius, capRadius: 20, color: self.thirdColor) | |
} | |
func addCirle(_ arcRadius: CGFloat, capRadius: CGFloat, color: UIColor) { | |
let X = self.bounds.midX | |
let Y = self.bounds.midY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
required init(coder aDecoder: NSCoder) { | |
super.init(coder: aDecoder)! | |
} | |
override init(frame: CGRect) { | |
super.init(frame: frame) | |
} | |
... | |
} |
NewerOlder