1
0
mirror of https://github.com/nicoverbruggen/phpmon.git synced 2025-08-08 04:20:07 +02:00

Add tests for domain list interaction

This commit is contained in:
2022-12-16 20:50:53 +01:00
parent de6dea066e
commit 15fe5e4716
5 changed files with 84 additions and 3 deletions

View File

@ -28,3 +28,20 @@ class UITestCase: XCTestCase {
}
}
extension XCUIElement {
/**
Clears all the text from a given element.
*/
func clearText() {
guard let stringValue = self.value as? String else {
return
}
var deleteString = String()
for _ in stringValue {
deleteString += XCUIKeyboardKey.delete.rawValue
}
typeText(deleteString)
}
}