Hello,
I'm trying to read a buttons current text, but I can't seem to find a good way to do that. Here's what i have right now:
func testExample() {
XCUIApplication().buttons["MahButton"].tap()
let button = XCUIApplication().buttons["NewVCBtn"]
XCTAssertEqual(button.value as! String, "New VC")
}
MahButton pushes a new VC, and then I'm finding my "NewVCBtn"; this works, .exists returns true if I put that in there, but .value is returning an empty string even though in the storyboard "New VC" is the buttons text.
Has anyone been able to get something similar to work?