* waits until the attribute is present on the element (e.g. boolean HTML `disabled`), * without requiring a specific attribute value.
(elementLocator: By, attribute: string, timeout: number)
| 424 | * without requiring a specific attribute value. |
| 425 | */ |
| 426 | async waitAttributePresent(elementLocator: By, attribute: string, timeout: number): Promise<void> { |
| 427 | Logger.trace(`${elementLocator}`); |
| 428 | |
| 429 | await this.driver.wait( |
| 430 | async (): Promise<boolean> => { |
| 431 | const attributeValue: string | null = await this.waitAndGetElementAttribute(elementLocator, attribute, timeout); |
| 432 | |
| 433 | return attributeValue != null; |
| 434 | }, |
| 435 | timeout, |
| 436 | `The '${attribute}' attribute is not present on '${elementLocator}'` |
| 437 | ); |
| 438 | } |
| 439 | |
| 440 | async type(elementLocator: By, text: string, timeout: number = TIMEOUT_CONSTANTS.TS_SELENIUM_CLICK_ON_VISIBLE_ITEM): Promise<void> { |
| 441 | const polling: number = TIMEOUT_CONSTANTS.TS_SELENIUM_DEFAULT_POLLING; |
no test coverage detected