How to use the @flood/element.Until.elementTextMatches function in @flood/element

To help you get started, we’ve selected a few @flood/element examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github flood-io / element / examples / flood-challenge.ts View on Github external
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')
	})
github flood-io / element / examples / flood-challenge / flood-challenge-basic.ts View on Github external
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()
	})