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

30 lines (22 loc) 1.06 kB
"use strict"; describe("element - getByXPath + expectToBeVisible", function () { let searchInput; it("Preparation", async function () { await common.navigation.navigateToUrl("https://sapui5.hana.ondemand.com/1.96.27/test-resources/sap/m/demokit/cart/webapp/index.html?sap-ui-theme=sap_fiori_3#/categories"); }); it("Execution", async function () { searchInput = await nonUi5.element.getByXPath("//input[@id='container-cart---homeView--searchField-I']"); }); it("Verification", async function () { await nonUi5.assertion.expectToBeVisible(searchInput, 10000); }); }); describe("element - getByXPath and catch error", function () { it("Preparation", async function () { await common.navigation.navigateToUrl("https://sapui5.hana.ondemand.com/1.96.27/test-resources/sap/m/demokit/cart/webapp/index.html?sap-ui-theme=sap_fiori_3#/categories"); }); it("Execution & Verification", async function () { await expect(nonUi5.element.getByXPath("sap-word")) .rejects.toThrow("Function 'getByXPath' failed"); }); });