![]() |
GPAL - Generally Positive Automation Library v1.0
GPAL The Fluent Automation LIbrary
|
Public Member Functions | |
| IAllowBrowserActionOrAnySelector | SetAttribute (string value) |
Directly sets a DOM attribute on the found element(s) via element.setAttribute(attribute, value), using the attribute name given to the preceding IAllowWithAttribute.WithAttribute call. Uses OttoMagic, Puppeteer or JavaScript depending on the active engine. Hardware automation has no equivalent operation, so it falls back to whichever of Selenium/JavaScript or Puppeteer is configured. | |
Definition at line 319 of file Interfaces.cs.
| IAllowBrowserActionOrAnySelector GenerallyPositive.Browser.IAllowSetAttributeValue.SetAttribute | ( | string | value | ) |
Directly sets a DOM attribute on the found element(s) via element.setAttribute(attribute, value), using the attribute name given to the preceding IAllowWithAttribute.WithAttribute call. Uses OttoMagic, Puppeteer or JavaScript depending on the active engine. Hardware automation has no equivalent operation, so it falls back to whichever of Selenium/JavaScript or Puppeteer is configured.
This is a low-level DOM write, distinct from SendString and FillIn* (see GPAL.WithTypingDelay for that distinction). It does not simulate typing or user interaction, does not honor GPAL.TypingDelay, and does not fire input/change events on its own - follow up with FireChangeEvent if the page needs to react to the new attribute value.
| value | Value to assign to the attribute |
Implemented in GenerallyPositive.Browser.Browser.