Skip to main content

AddClass

Adds one or more CSS classes to a specific HTML element, changing its style or behavior according to the applied classes. This action is used to dynamically modify the appearance or functionality of elements.

Parameters

  • page (visitResponse .page): The page object returned by Pupet.Visit.
  • className - String : It's a CSS selector string that is used to identify a specific element or elements on a web page.
  • Parent - IElementHandle

RpScript​

How to use
Pupet.OpenBrowser({ headless: false, browser: "Chrome" });
var pageresponse = Pupet.Visit("https://www.iwc.com/en/home.html");
Pupet.AddClass(pageresponse.page, button.submit, "myTestClass");
Pupet.CloseBrowser();

Extension​