赛普拉斯:如何从Mailosaur上创建的虚拟设备检索一次性密码
在此图像中,您可以看到“显示一次性密码”按钮。
我已经检查了密码是否可以与我正在使用的网站一起使用,现在我正在尝试创建一个柏树测试以检索该密码,并将其键入文本字段。
我不确定“ MailosaurgetDeviceOTP”功能是否可以执行我要做的事情。请注意,“ deviceName”是第一个图像中的名称。
如何从Mailosaur上的虚拟设备中获取一次密码,然后将其键入用于使用的文本框?
I have a virtual device set up on Mailosaur, as seen below.
Within this image, you can see the "Reveal One-Time Passcode" button.
I have checked that the passcode works with the website I am working with, and now I am trying to create a Cypress test to retrieve this passcode, and type it into a text field.
The code I currently have in the Cypress.feature file looks like this.
The code I currently have in the Cypress.js file looks like this.
I am unsure if the "mailosaurGetDeviceOtp" function does what I am trying to do. Note that 'deviceName' is the same name that is in the first image, mailosaurINT.
How do I get the one time passcode from the virtual device on Mailosaur, and then type it into a text box to be used?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在
cypress-mailosaur
中有一个测试,该测试说明了如何使用自定义命令,ref
所以您的测试就是这样(我不认为
douond()
呼叫这里需要)There's a test in
cypress-mailosaur
that illustrates how to use the custom command,Ref
so your test would be this (I don't think the
done()
call is needed here)