【发布时间】:2020-03-04 00:42:59
【问题描述】:
这是我通过 google sso 登录应用程序后弹出的确认提示。
我遇到了在此弹出窗口中单击“继续”按钮的问题。我已经看到一些关于此类问题的讨论,但没有任何帮助。 这是我尝试过的 - Detox: iOS Simulator how to confirm alert message,但它没有用。 另外,我在 appium app 中打开了一个应用程序以查看那里的确切元素名称,尝试在测试中使用它,但没有成功。
这就是我与元素交互的方式
it('should have welcome screen', async () => {
await expect(element(by.id('hostname-input'))).toBeVisible();
await element(by.id('hostname-input')).typeText('companyName');
await element(by.id('hostname-submit-button')).tap();
await element(by.id('googleAuthButton')).tap();
// XCUIElementTypeButton[@name="Continue"]
await waitFor(element(by.type('XCUIElementTypeButton')))
.toExist()
.withTimeout(10000);
await element(
by.name('Continue').and(by.type('XCUIElementTypeButton')),
).tap();
});
这是错误:
Element matcher: ((!(kindOfClass('RCTScrollView')) && ((kindOfClass('(null)') && isNotNil) && !(kindOfClass('UIAccessibilityTextFieldElement')))) || (((kindOfClass('UIView') || respondsToSelector(accessibilityContainer)) && parentThatMatches(kindOfClass('RCTScrollView'))) && ((kindOfClass('UIView') || respondsToSelector(accessibilityContainer)) && parentThatMatches(((kindOfClass('(null)') && isNotNil) && !(kindOfClass('UIAccessibilityTextFieldElement')))))))
关于如何解决这个问题的任何想法? 提前致谢。
【问题讨论】:
标签: detox