Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Verify the page has a header text
// Verify "Welcome to Wikipedia" text is available
const text = (await driver
.findElement(By.id("mp-topbanner"))
.getText()).toLowerCase();
if (text && text.indexOf("welcome to wikipedia") >= 0) {
console.log(`\n"Welcome to Wikipedia" is found!\n`);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.