( elementLocator: By, text: string, timeout: number = TIMEOUT_CONSTANTS.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM )
| 611 | } |
| 612 | |
| 613 | async enterValue( |
| 614 | elementLocator: By, |
| 615 | text: string, |
| 616 | timeout: number = TIMEOUT_CONSTANTS.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM |
| 617 | ): Promise<void> { |
| 618 | if (elementLocator.toString().toLocaleLowerCase().includes('password')) { |
| 619 | Logger.trace(`${elementLocator} text: ***`); |
| 620 | } else { |
| 621 | Logger.trace(`${elementLocator} text: ${text}`); |
| 622 | } |
| 623 | |
| 624 | await this.waitVisibility(elementLocator, timeout); |
| 625 | await this.clear(elementLocator); |
| 626 | await this.waitAttributeValue(elementLocator, 'value', '', timeout); |
| 627 | await this.type(elementLocator, text, timeout); |
| 628 | await this.waitAttributeValue(elementLocator, 'value', text, timeout); |
| 629 | } |
| 630 | |
| 631 | async waitAndSwitchToFrame(iframeLocator: By, timeout: number): Promise<void> { |
| 632 | Logger.trace(`${iframeLocator}`); |
no test coverage detected