Guest User

Untitled

a guest
Oct 20th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. import Foundation
  2.  
  3. class HomeVC{
  4.  
  5. let app = XCUIApplication()
  6. let tabBarsQuery = app.tabBars
  7. let tablesQuery = app.tables
  8.  
  9. let btn = app.buttons["a"]
  10. let btn2 = app.buttons.element(boundBy: 0)
  11. let txt = app.tables.staticTexts["a"]
  12.  
  13. }
  14.  
  15. import XCTest
  16.  
  17. class UITests: XCTestCase {
  18.  
  19. let config = TestConfig()
  20. let log = Log()
  21.  
  22. override func setUp() {
  23. super.setUp()
  24.  
  25. // Put setup code here. This method is called before the invocation of each test method in the class.
  26.  
  27. // In UI tests it is usually best to stop immediately when a failure occurs.
  28. continueAfterFailure = false
  29. // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
  30. XCUIApplication().launch()
  31.  
  32. // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
  33. }
  34.  
  35. override func tearDown() {
  36. // Put teardown code here. This method is called after the invocation of each test method in the class.
  37. super.tearDown()
  38.  
  39. }
  40. func testExample() {
  41.  
  42. //Call HomeVC
  43. let homeVC = HomeVC()
  44. homeVC.btn.tap()
  45. homeVC.btn2.tap()
  46. homeVC.txt.tap()
  47. }
Advertisement
Add Comment
Please, Sign In to add comment