当我单击按钮时,我尝试检查是否位于正确的页面上。
这是我的代码:
describe('espace_parent is functional', () => {
it('test login parent', () => {
cy.visit('http://localhost:3000')
cy.contains('parent').click()
cy.contains('Espace Parent')
cy.get(":input[placeholder='Adresse e-mail']").type('guigui@guigui.fr')
cy.get(":input[placeholder='Mot de passe']").type('guigui')
cy.contains('Se connecter').click()
cy.log('Current URL is ')
cy.contains("Accueil")
})
})
Run Code Online (Sandbox Code Playgroud)
在此代码中,我在 localhost3000 上,单击必须将我重定向到 localhost3000/connexion/parent 的父级,我想登录,但我不知道它是否正常工作。
我已经尝试过做不同的事情来打印 URL,但没有任何效果。
我知道我的问题很奇怪,但我有一个问题,
当我尝试将“toto”放在 a5 行时,它会抑制我所有的旧数据。这是我的代码(我只是按照文档进行操作)。
import xlsxwriter
# Workbook() takes one, non-optional, argument
# which is the filename that we want to create.
workbook = xlsxwriter.Workbook('hello.xlsx')
# The workbook object is then used to add new
# worksheet via the add_worksheet() method.
worksheet = workbook.add_worksheet()
# Use the worksheet object to write
# data via the write() method.
worksheet.write('A4', 'Hello..')
worksheet.write('B1', 'Geeks')
worksheet.write('C1', 'For')
worksheet.write('D1', 'Geeks')
# Finally, close the Excel file
# via the close() method.
workbook.close()
Run Code Online (Sandbox Code Playgroud)
该代码可以运行,但我想在此之后添加一些元素。当我用不同的值重试该函数时,它会删除 a4 上的 …