MCPcopy Index your code
hub / github.com/eclipse-che/che / waitAttributePresent

Method waitAttributePresent

tests/e2e/utils/DriverHelper.ts:426–438  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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;

Callers 1

Calls 3

traceMethod · 0.80
waitMethod · 0.45

Tested by

no test coverage detected