Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
step('Flood Challenge: Step 4', async (browser: Driver) => {
await browser.wait(Until.elementTextMatches('span.token', /\d+/))
let element = await browser.findElement('span.token')
let token = await element.text()
await browser.type(By.id('challenger_one_time_token'), token)
await browser.takeScreenshot()
await browser.click('input.btn')
})
step('5. One Time Token', async browser => {
await browser.click('input.btn')
await browser.wait(Until.elementTextMatches('span.token', /\d+/))
let element = await browser.findElement('span.token')
let token = await element.text()
await browser.type(By.id('challenger_one_time_token'), token)
await browser.takeScreenshot()
})