You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Cypress自动化SAP Hybris登录测试时无法定位元素求助

SAP Hybris Backoffice登录页面Cypress元素定位失败问题

我打算用Cypress实现SAP Hybris的测试流程自动化,但第一步登录环节就遇到了问题。登录页面链接:https://backoffice.iqos.com/backoffice/login.zul,页面截图如下:
SAP Hybris Backoffice登录页面

需要完成的操作:

  • 输入用户名
  • 输入密码
  • 点击登录按钮

我没有可用的账号信息,尝试通过元素ID、类名以及占位符使用cy.get()命令定位元素,但均未成功,始终提示无法找到元素。以下是我尝试的测试代码:

describe('Write into input element', () => {
  it('should write "123" into the input element', () => {
    // Visit the page where the input element is located
    cy.visit('https://backoffice.iqos.com/backoffice/login.zul');
   
    cy.get('placeholder[data-cy="Enter user name"]:visible').click();
  });
});

内容的提问来源于stack exchange,提问作者No Tools No Craft

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.22 18:27:07