赛普拉斯img元素属性检查

时间:2019-03-07 12:47:53

标签: javascript cypress

我需要检查页面上的所有图像是否都具有Alt属性。我以为执行以下操作可以做到这一点,但是它不能正确检查事情,当我知道不正确时,只是给了我一切都很好。 cy.get('img').should('have.attr', 'alt' );

除了许多浏览页面并为每个图像构建选择器之外,还有其他简便的解决方案吗?

1 个答案:

答案 0 :(得分:5)

要检查每个元素,可以使用 keycloak: auth-server-url: https://sso-ssoha.b9ad.pro-us-east-1.openshiftapps.com/auth realm: master resource: clientname public-client: true

Mixed Content: The page at 'https://www.helpful.army/contents/Problem' was loaded over HTTPS, but requested an insecure resource 'http://serviceha-helpfularmy.b9ad.pro-us-east-1.openshiftapps.com/sso/login'. This request has been blocked; the content must be served over HTTPS.