[英]Cypress cy.origin is doesn't work when it link to LinkedIn
I was developing a feature that redirects users to profiles on various platforms.我正在开发一项功能,可以将用户重定向到各种平台上的配置文件。 And to test this, I wrote the following code using the newly released
cy.origin
yesterday.为了测试这一点,我昨天使用新发布的
cy.origin
编写了以下代码。
cy.origin('www.example.com', () => {
cy.visit('/username')
})
However, github and twitter were successfully redirected, but linkedin was not the only one.然而,github和twitter被成功重定向,但linkedin并不是唯一的。
I think the problem is caused by the user agent.我认为问题是由用户代理引起的。 Is there any way to solve this problem?
有什么办法可以解决这个问题吗?
For the record,作为记录,
cy.origin('https://www.linkedin.com', () => {
cy.visit('/in/sunwoo0706', {failOnStatusCode: false}) // redirects to login page
})
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.