UNPKG

@assert-equals/dappdriver

Version:

DappDriver is an e2e testing framework designed for testing decentralized applications (dApps) using MetaMask, Rainbow or Zerion

45 lines (44 loc) 1.28 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SelectWallets = void 0; const html_element_1 = require("../../../controls/html-element"); const page_1 = require("../../../page"); const password_1 = require("./password"); /** * * * @export * @class SelectWallets * @extends {PageObject} */ class SelectWallets extends page_1.PageObject { activeWalletButton = (index) => new html_element_1.HTMLElement(`div[title="Derivation path: m/44'/60'/0'/0/${index}"]`); continueButton = () => new html_element_1.HTMLElement('xpath=//button[contains(., "Continue")]'); /** * Creates an instance of SelectWallets. * @memberof SelectWallets */ constructor() { super('onboarding#/onboarding/import/mnemonic?view=select-wallets', 'Zerion'); } /** * * * @param {number} index * @return {*} {Promise<void>} * @memberof SelectWallets */ async selectWallet(index) { return await this.activeWalletButton(index).click(); } /** * * * @return {*} {Promise<Password>} * @memberof SelectWallets */ async continue() { return await this.continueButton().click(password_1.Password); } } exports.SelectWallets = SelectWallets;