I code test in puppeteer with jest:
How to create reusable function for similar login tests without code repeating?
describe('new user test', () => {
test('no existed user try', async() => {
browser = await puppeteer.launch(chromeOptions)
const page = await browser.newPage();
await page.goto("https://admin.manager.synthrone.com/")
await page.waitForSelector('#mat-input-0')
await page.type('#mat-input-0', 'test')
await page.type('#mat-input-1', 'pass')
await page.click('button')
Aucun commentaire:
Enregistrer un commentaire