UNPKG

@sap_oss/wdio-qmate-service

Version:

[![REUSE status](https://api.reuse.software/badge/github.com/SAP/wdio-qmate-service)](https://api.reuse.software/info/github.com/SAP/wdio-qmate-service)[![Node.js CI](https://github.com/SAP/wdio-qmate-service/actions/workflows/node.js.yml/badge.svg)](http

32 lines (26 loc) 1.1 kB
"use strict"; describe("element - waitToBePresent", function () { it("Preparation", async function () { await common.navigation.navigateToUrl("http://localhost:34005/waitForElements.html"); }); it("Execution & Verification", async function () { await nonUi5.element.waitToBePresent("BUTTON", 30000); }); }); describe("element - waitToBePresent - wrong selector (error case)", function () { it("Preparation", async function () { await common.navigation.navigateToUrl("http://localhost:34005/waitForElements.html"); }); it("Execution & Verification", async function () { await expect(nonUi5.element.waitToBePresent("BUTTON[class='wrong']", 1000)) .rejects.toThrow("Function 'waitToBePresent' failed"); }); }); describe("element - waitToBePresent - invisible element", function () { it("Preparation", async function () { await common.navigation.navigateToUrl("http://localhost:34005/hiddenAndVisible.html"); }); it("Execution & Verification", async function () { await nonUi5.element.waitToBePresent("P[id='hiddenParagraph']", 30000); }); });