【发布时间】:2020-07-03 20:07:02
【问题描述】:
我无法将密钥发送到以下输入(只有在这里我失败了,其余的都是工作)。 我收到错误消息:
StaleElementReferenceError: stale element reference: element is not attached to the page document
代码:
test('Should insert an invalid password', async done => {
const css = by.css('[id=password111]')
const password = await element(css)
await password.clear()
await password.sendKeys('tom')
// await submitForm()
done()
})
html:
<nz-input-group [id]="'passwordContainer'" [nzSuffix]="passwordSuffixTemplate" nzSize="large">
<input [id]="'password111'"
class="cdf-input"
[type]="passwordVisible ? 'text' : 'password'"
nz-input
nzSize="large"
[required]="passwordAuth"
[formControlName]="'password'"
[placeholder]="'Password'"
/>
</nz-input-group>
谁知道我哪里错了??
【问题讨论】:
标签: selenium selenium-webdriver css-selectors protractor angular-test