Created
April 26, 2020 06:06
-
-
Save javaadpatel/82c6df90720b94be1ac36275c14ce867 to your computer and use it in GitHub Desktop.
Flood Element Test Example (repository: https://github.com/javaadpatel/Medium_FloodElement_AzureDevops)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { step, TestSettings, Until, By, Device } from "@flood/element"; | |
import * as assert from "assert"; | |
export const settings: TestSettings = { | |
device: Device.iPadLandscape, | |
userAgent: | |
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36", | |
clearCache: true, | |
disableCache: true, | |
clearCookies: true, | |
waitTimeout: 30, | |
screenshotOnFailure: true, | |
extraHTTPHeaders: { | |
"Accept-Language": "en", | |
}, | |
}; | |
/** | |
* Random Test | |
* @version 1.0 | |
*/ | |
//element run test.ts --no-headless | |
export default () => { | |
step("Test: Random Site Navigation Login", async (browser) => { | |
//visit random website | |
await browser.visit("https://google.com"); | |
//take screenshot of final page shown | |
await browser.takeScreenshot(); | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment