admin管理员组文章数量:1336660
describe('My First Test', () => {
it('Visits Replpad', () => {
cy.visit('/')
cy.get('input').type('now')
})
})
Trying to type some text into the bottom input field but it times out trying to find the input field. I've extended the time out period up to 10,000 but it still doesn't see the input field.
Is there a solution to this?
describe('My First Test', () => {
it('Visits Replpad', () => {
cy.visit('http://hostilefork./media/shared/replpad-js/')
cy.get('input').type('now')
})
})
Trying to type some text into the bottom input field but it times out trying to find the input field. I've extended the time out period up to 10,000 but it still doesn't see the input field.
Is there a solution to this?
Share Improve this question edited Dec 19, 2021 at 5:52 Graham Chiu asked Dec 19, 2021 at 5:43 Graham ChiuGraham Chiu 4,8863 gold badges26 silver badges42 bronze badges 3- 1 Please show the dom structure of you page – Mikhail Bolotov Commented Dec 19, 2021 at 12:38
- The console appears here github./hostilefork/replpad-js/blob/master/index.html#L121 in consult_out, and is created here github./hostilefork/replpad-js/blob/master/replpad.reb#L350 – Graham Chiu Commented Dec 19, 2021 at 14:05
-
why not just look into the DOM as it shown in the Cypress runner after you've execute your test? It shows it exactly as it was at the moment when Cypress was trying to find the
input
element. – Mikhail Bolotov Commented Dec 19, 2021 at 14:59
1 Answer
Reset to default 4instead of
cy.get('input').type('now')
try
cy.get('.input').type('now')
because you are looking for the class name not for the tag
本文标签: javascripttyping into an input field using CypressStack Overflow
版权声明:本文标题:javascript - typing into an input field using Cypress - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742418098a2471107.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论