0

I am using EarlGrey framework but not sure which will be the method used to capture text value from an UI lable/ Textfield when using accessibility ID.

1 Answers1

0

You can use grey_accessibilityID("") Like so:

class MyFirstEarlGreyTest: XCTestCase {

  func testExample() {

    EarlGrey
      .select(elementWithMatcher: grey_accessibilityID("phone_number_text_field"))
      .assert(grey_sufficientlyVisible())
      .perform(grey_replaceText("1234"))
  }
}

I hope this helps!

Glenn Posadas
  • 12,555
  • 6
  • 54
  • 95