cypress - 使用 cy.viewport("anydevice") 运行脚本时,应用程序无法以移动响应模式打开
问题描述
使用 cy.viewport("anydevice") 运行脚本时,应用程序无法以移动响应模式打开。
我正在使用 cypress mocha,但在移动响应视图中看不到应用程序
describe('生产测试套件', function() {
it('TC02_AuthorizedLoginVerification_Mobile', function()
{
cy.viewport('samsung-s10')
cy.visit('https://staging.youvisit.com/tour/hanover')
cy.get('div[id=registration-visitortype]').click()
cy.get('td[item-value=prospective_student').click()
cy.get('td[item-value=hs_student]').click()
cy.get('div[id=registration-firstname').click()
cy.get('input[id=firstname]').type("Test First Name")
cy.get('div[id=registration-lastname').click()
cy.get('input[id=lastname]').type("Test Last Name")
cy.get('div[id=registration-email').click()
cy.get('input[id=email]').type("Test@gmail.com")
cy.get('select[id=enrollyear]').select("2021")
cy.get('select[id=enrollterm]').select("Fall")
cy.get('input[id=school]').type("Weldon Curt")
cy.get('select[id=major]').select("Accounting")
cy.get('select[id=gender]').select("Female")
cy.get('div[id=registration-birthdate]').type("07/07/2000")
cy.get('input[id=phone]').type("123456789")
cy.get('select[id=country]').select("United States (USA)")
cy.get('input[id=us_street]').type("Test Street")
cy.get('input[id=us_postal]').type("02340")
cy.get('input[id=us_street]').click()
cy.contains('DONE').click()
cy.contains('Thanks for your submission!').should('be.visible')
})
})
解决方案
推荐阅读
- spring-boot - 获取错误格式响应实体数据
- r - 是否有一个函数可以获取与 MI 数据库分析相关的线性方程建模的汇集标准化系数?
- c# - 如何在 Web 服务 C# 的 ASMX 文件中隐藏一些声明的方法
- javascript - 找不到变量:geoplugin_countryCode - JavaScript
- android-studio - 如何在 android studio 上修复已弃用的协程异步、UI 和等待
- scala - 使用 Spark Scala 从字符串到数组 [Structype] 的模式转换
- reactjs - 在我创建 PWA 的 APK 后,我看到了浏览器的工具栏
- react-native - 如何修复 React Native 中的“找不到模块”.../template.config”错误
- javascript - 动态设置元标签 EJS
- javascript - header 和 location.href 不会加载另一个页面,而是使用根目录