1

我在 cypress 中编写了以下测试,该测试注册但在点击管理帐户中出现问题:

import faker from 'faker'
describe('Registration', () => {
const email = faker.internet.email()
const password = faker.internet.password()
it('successfully registering', () => {
    cy.visit('http://l8.test/register')
    cy.get('input[name=name]').type(faker.name.findName())
    cy.get('input[name=email]').type(email)
    cy.get('input[name=password]').type(password)
    cy.get('input[name=password_confirmation]').type(password)
    cy.get('button').contains('Register').click()
    cy.url().should('contain', '/dashboard')
    //I would like to click on the Management Account, but I can't
    cy.get('button.flex.text-sm.border-2.border-transparent.rounded-full.focus:outline-none.focus:border-gray-300.transition.duration-150.ease-in-out').click()
    //   cy.contains('Logout').click()
})
})

给我以下错误:

button.flex.text-sm.border-2.border-transparent.rounded-full.focus:outline-none.focus:border-gray-300.transition.duration-150.ease-in-out Error 语法错误,无法识别表达式:不支持伪:outline-none

基本上我希望他点击这个: 在此处输入图像描述

4

1 回答 1

1
  cy.get('button.flex.text-sm.border-2.border-transparent.rounded-full').click()
于 2020-09-21T10:52:05.513 回答