ElementIsExists
ElementIsExists checks if a specific element is present on a page or application. If the element is found, the process continues; if not, it returns an error or warning.
Parameters
- page (visitResponse .page): The page object returned by Pupet.Visit.
- selector -
String: The CSS selector used to identify the element within the iframe. For example, #button-id could refer to a button element's ID. - Parent - IElementHandle
- waitForSelectorOptions -
WaitOption= Options for wait operations
RpScript
How to use
Pupet.OpenBrowser({ headless: false, browser: "Chrome" });
var pageresponse = Pupet.Visit("https://erametricras.com/");
var WaitOptionForElementExists = Pupet.WaitOptionForElementExists(2000);
var isExists = Pupet.ElementIsExists(pageresponse.page, "li#menu-item-1502 > a:nth-child(1) > div.tdb-menu-item-text", null, WaitOptionForElementExists);
Pupet.CloseBrowser();
Extension
