tutu/test/objects/accounts.ts

25 lines
596 B
TypeScript
Raw Normal View History

2024-12-21 09:19:43 +00:00
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 urlIsTheCurrent() {
2024-12-21 09:19:43 +00:00
const urlMatched =
new URL(await browser.getUrl()).pathname === "/accounts/sign-in";
return urlMatched;
2024-12-21 09:19:43 +00:00
}
/**
* overwrite specific options to adapt it to page object
*/
public static async open() {
return await super.open("accounts/sign-in");
}
}