angular - TestCafe 在登录过程中失去对弹出窗口的控制
问题描述
目前我正在为我的角度项目进行一些 e2e 测试。我面临的问题是 TestCafe 在单击登录按钮后无法控制新的弹出窗口。有没有办法手动控制新的弹出窗口?
import { Selector } from 'testcafe';
fixture`Getting Started`
.page`localhost:4200`
const signInButton = Selector('#signInButton')
const userEmail = Selector('#textEmail')
const nextUserEmail = Selector('#nextEmailButton')
const userPassword = Selector('#textPassword')
const nextUserPassword = Selector('#nextPasswordButton')
test('Should login', async t => {
await t
.click(signInButton)
await t
.typeText(userEmail, 'xy@mail')
.click(nextUserEmail)
await t
.typetext(userPassword, 'pw')
.click(nextUserPassword)
});
感谢您的帮助和最好的问候
解决方案
推荐阅读
- c# - 程序找不到路径部分视图
- postgresql-8.2 - 如何将多个函数保存为 Postgresql 中的每个文件(* .sql)?
- c - 为什么 fread() 函数没有到达文件末尾并且循环无限地继续,同时从文件中读取结构?
- http - 如何限制 IBM Integration Bus 中每个 IP 地址的 HTTP 请求数?
- java - Logstash.bat 找不到主类错误
- css - 在一个角度应用程序中动态切换两个styles.css文件
- spring-boot - Spring-Boot Server 未运行,在 Initializing Spring FrameworkServlet 'dispatcherServlet 后挂起
- javascript - 从开始时间和结束时间获取时间段
- android - 在 android 中集成 Freshdesk 时文件提供程序异常
- python - 脚本找不到元素,但控制台可以 [Selenium] [Python]