【问题标题】:how to get data from commands in cypress如何从赛普拉斯的命令中获取数据
【发布时间】:2022-11-12 18:58:28
【问题描述】:
 cy.get(':nth-child(1) > .form-control').type(userName)
        
        get(':nth-child(2) > .form-control').type(email)
        
        get(':nth-child(3) > .form-control').type(password)

如何获取用户名、电子邮件、密码数据? 在柏树中

【问题讨论】:

    标签: javascript cypress


    【解决方案1】:

    不确定为什么要检查文本是否已正确“输入”到输入字段中,但在这里:

     cy.get(':nth-child(1) > .form-control').should('have.text', userName);
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-27
      • 1970-01-01
      • 1970-01-01
      • 2019-09-14
      • 1970-01-01
      • 2018-06-29
      相关资源
      最近更新 更多