GetAttribute
The GetAttribute method is used to retrieve the value of a specified attribute from a web page element.
Parameters
- page (visitResponse .page): The page object returned by Pupet.Visit.
- Parent - IElementHandle
- propName -
String: The name of the attribute whose value you wish to retrieve.
RpScript
How to use
Pupet.OpenBrowser({ headless: false, browser: "Chrome" });
var pageresponse = Pupet.Visit("https://erametricras.com/");
var heroImageElement = Pupet.FindElement(pageresponse.page, "div.td_block_wrap.tdb_header_logo.tdi_31.td-pb-border-top.td_block_template_1.tdb-header-align > div.tdb-block-inner.td-fix-index > a.tdb-logo-a > h1:nth-child(1) > span.tdb-logo-img-wrap", null);
var hrefValue = Pupet.GetAttiribute(pageresponse.page, heroImageElement, "href ");
Extension
