0

I have a test that taps on different tab bar buttons. The test fails with below error on iPhone X. But runs successfully on iPhone SE, iPhone 6 and 8 Plus.

what could be the issue?

Failed to scroll to visible (by AX action) Button

    func testForScreenShots() {       

        let app = XCUIApplication()
        continueAfterFailure = false

        let tabBarsQuery = app.tabBars

        tabBarsQuery.buttons["My Shelf"].tap()

}

Thanks Ashish

ashishn
  • 410
  • 5
  • 18

1 Answers1

-1

My guess is that you may need some constraints for the tabBars. Not sure where it's located on the screen, but I suppose it's on the top which iPhone X is different with older devices.

Bill Wu
  • 1
  • 1