这是我的自定义视图,其中“LondonStreet”是一个按钮.
当我点击那个按钮时,我得到url并在Safari中打开它(它可以工作).然后我可以回去,使用“返回心愿单”按钮(它也有效).
问题是当我尝试在UITests下测试时.
itemsTable.cells.elementBoundByIndex(0).buttons["addressButton"].tap() //press the button to open link in Safari
除此之外:
app.statusBars.buttons["Back to Wishlist"].tap() //go back,doesn't work,although it was recorded by Xcode itself.
是一个错误:
UI Testing Failure – Failed to get screenshot within 5s.
还有问题导航器
UI Testing failure – Unable to update application state promptly.