@assert-equals/dappdriver
Version:
DappDriver is an e2e testing framework designed for testing decentralized applications (dApps) using MetaMask, Rainbow or Zerion
34 lines (33 loc) • 1.23 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PlaywrightInputText = void 0;
const html_element_1 = require("./html-element");
class PlaywrightInputText extends html_element_1.PlaywrightHTMLElement {
constructor(cssLocator) {
super(cssLocator);
}
async clear() {
return await this.webElement.clear({ timeout: this.timeout });
}
async focus() {
return await this.webElement.focus({ timeout: this.timeout });
}
async getText() {
return await this.getValue();
}
async getValue() {
return await this.webElement.inputValue({ timeout: this.timeout });
}
async type(keys) {
return await this.webElement.pressSequentially(keys, { timeout: this.timeout });
}
async typeAndEnter(keys) {
await this.webElement.pressSequentially(keys, { timeout: this.timeout });
return await this.webElement.press('Enter', { timeout: this.timeout });
}
async typeAndTab(keys) {
await this.webElement.pressSequentially(keys, { timeout: this.timeout });
return await this.webElement.press('Tab', { timeout: this.timeout });
}
}
exports.PlaywrightInputText = PlaywrightInputText;