小编use*_*164的帖子

如何使用赛普拉斯测试登录到GSuite日历的方法

环境

  • Windows 10
  • 节点8
  • 赛普拉斯3.1.2
  • 铬v59

如何使用赛普拉斯向Google日历进行身份验证?

我需要在正在开发的Chrome扩展程序上运行自动化测试。第一步是验证/登录GSuite日历。

我正在使用赛普拉斯,但不允许我登录到GSuite日历。而是(从赛普拉斯)“单击登录”时,它将Next再次跳至该按钮。

我的代码段

describe('Login',function() {
   it('Go to GSuite calendar', function() {
     cy.visit('https://www.google.com/calendar')
   })

   it('Login', function() {
     cy.get('#Email').type('my user')
     cy.get('#next').click()
     cy.get('#Passwd').type('my password')
     cy.get('#signIn').click()
   })
})  
Run Code Online (Sandbox Code Playgroud)

这失败,将我带到Next按钮

屏幕截图

1.点击执行

第一张图片

2.最后,它返回到初始屏幕,而不是登录我

第二张图片

我对硒的尝试及其有效

from selenium import webdriver
import time

# variables for userid & password
u = "JohnDoe@xxxx-labs.com"
p = "Mysecretpassword"

# chromedriver installation required for login through google chrome
driverpath = "C:/Users/pjain2/Desktop/chromedriver_win32/chromedriver"

# launch google calendar login page
d = webdriver.Chrome(driverpath) …
Run Code Online (Sandbox Code Playgroud)

selenium node.js cypress

5
推荐指数
1
解决办法
498
查看次数

标签 统计

cypress ×1

node.js ×1

selenium ×1