(elementLocator: By, attribute: string, expectedValue: string, timeout: number)
| 406 | } |
| 407 | |
| 408 | async waitAttributeValue(elementLocator: By, attribute: string, expectedValue: string, timeout: number): Promise<void> { |
| 409 | Logger.trace(`${elementLocator}`); |
| 410 | |
| 411 | await this.driver.wait( |
| 412 | async (): Promise<boolean> => { |
| 413 | const attributeValue: string = await this.waitAndGetElementAttribute(elementLocator, attribute, timeout); |
| 414 | |
| 415 | return expectedValue === attributeValue; |
| 416 | }, |
| 417 | timeout, |
| 418 | `The '${attribute}' attribute value doesn't match with expected value '${expectedValue}'` |
| 419 | ); |
| 420 | } |
| 421 | |
| 422 | /** |
| 423 | * waits until the attribute is present on the element (e.g. boolean HTML `disabled`), |
no test coverage detected