add webdriverio framework
This commit is contained in:
parent
189662b9e0
commit
14beef39c2
9 changed files with 409 additions and 2 deletions
25
test/objects/accounts.ts
Normal file
25
test/objects/accounts.ts
Normal file
|
@ -0,0 +1,25 @@
|
|||
import { $, browser } from "@wdio/globals";
|
||||
import Page from "./page.js";
|
||||
|
||||
/**
|
||||
* sub page containing specific selectors and methods for a specific page
|
||||
*/
|
||||
export class SignInPage extends Page {
|
||||
public static get serverUrlInput() {
|
||||
return $("[name=serverUrl]");
|
||||
}
|
||||
|
||||
public static async beTheCurrentPage() {
|
||||
const urlMatched =
|
||||
new URL(await browser.getUrl()).pathname === "/accounts/sign-in";
|
||||
const elementShowed = await this.serverUrlInput.isDisplayed();
|
||||
return urlMatched && elementShowed;
|
||||
}
|
||||
|
||||
/**
|
||||
* overwrite specific options to adapt it to page object
|
||||
*/
|
||||
public static async open() {
|
||||
return await super.open("accounts/sign-in");
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue