键入用户电子邮件地址后,我希望排毒通过下一步移至密码字段。
我试图通过元素ID找到密码字段并调用.tap()
以进行焦点,但是键盘部分阻塞了密码字段,并且无法通过75%的可见性标准。
Error Trace: [
{
"Description" : "Assertion with matcher [M] failed: UI element [E] failed to match the following matcher(s): [S]",
"Description Glossary" : {
"M" : "matcherForSufficientlyVisible(>=0.750000)",
"E" : "<RCTUITextField:0x7f9abd45f190; AX=Y; AX.id='Password Input'; AX.value='your new password'; AX.frame={{42.5, 342.5}, {235, 40}}; AX.activationPoint={160, 362.5}; AX.traits='UIAccessibilityTraitNone'; AX.focused='N'; frame={{0, 0}, {235, 40}}; alpha=1; text=''>",
"S" : "matcherForSufficientlyVisible(>=0.750000)"
},
"Error Domain" : "com.google.earlgrey.ElementInteractionErrorDomain",
"Error Code" : "3",
"File Name" : "GREYAssertions.m",
"Function Name" : "+[GREYAssertions grey_createAssertionWithMatcher:]_block_invoke",
"Line" : "75"
}
]
知道我如何解决这个问题?我正在使用排毒来测试一个反应的应用。
谢谢。
事实证明,它与将 n
添加到文本末端一样简单:
const email = 'test@email.com';
await element(by.id('email_input')).typeText(`${email}n`);