Skip to content

Instantly share code, notes, and snippets.

@javaadpatel
Created April 26, 2020 06:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save javaadpatel/82c6df90720b94be1ac36275c14ce867 to your computer and use it in GitHub Desktop.
Save javaadpatel/82c6df90720b94be1ac36275c14ce867 to your computer and use it in GitHub Desktop.
Flood Element Test Example (repository: https://github.com/javaadpatel/Medium_FloodElement_AzureDevops)
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