Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
424 views
in Technique[技术] by (71.8m points)

javascript - 我们如何测试从赛普拉斯现有标签重定向的新标签?(How can we test a new tab that is redirected from an existing tab in cypress?)

Need to test a new tab that is redirected from the existing tab.(需要测试从现有选项卡重定向的新选项卡。)

How can we test that in cypress?(我们如何在赛普拉斯中进行测试?)   ask by Richu Bhat translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You can not test that.(您无法测试。)

Cypress has no support on new windows and/or tabs.(赛普拉斯不支持新窗口和/或选项卡。) What you can do as a workaround is:(您可以采取的解决方法是:) Test if the link to the new window/tab is present(测试到新窗口/选项卡的链接是否存在) Create another test which opens the URL of that window/tab immediately.(创建另一个测试,该测试将立即打开该窗口/选项卡的URL。)

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...