![]() |
GPAL - Generally Positive Automation Library v1.0
GPAL The Fluent Automation LIbrary
|
Pseudo element used in Applications and Browser workflows for image matching and unified automation. Implements IGPALElement and mimics IWebElement where possible. More...
Public Member Functions | |
| void | Clear () |
| Clears the element's value (if supported by underlying element). | |
| void | Click (ModifierKeys modifierKeys) |
| Performs a click with optional keyboard modifiers. | |
| void | Click () |
| Performs a standard left click. | |
| void | MiddleClick (ModifierKeys modifierKeys=ModifierKeys.NONE) |
| Performs a middle mouse button click. | |
| void | Hide () |
| Hides the element via JavaScript (sets display:none). | |
| IWebElement | FindElement (By by) |
| Finds a child element using Selenium By locator. | |
| ReadOnlyCollection< IWebElement > | FindElements (By by) |
| Finds all child elements using Selenium By locator. | |
| string | GetAttribute (string attributeName) |
| Gets an attribute value with fallback to internal dictionary. | |
| void | SetAttribute (string attributeName, string value) |
Directly sets a DOM attribute on this element via element.setAttribute(attributeName, value), using 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. See Browser.IAllowSetAttributeValue.SetAttribute for the distinction between this and SendString/FillIn*. | |
| string | GetCssValue (string propertyName) |
| Gets a computed CSS value. | |
| string | GetDomAttribute (string attributeName) |
| Gets a DOM attribute. | |
| string | GetDomProperty (string propertyName) |
| Gets a DOM property. | |
| ISearchContext | GetShadowRoot () |
| Returns the ShadowRoot if available. | |
| void | SendKeys (string text) |
| Sends keystrokes to the element. | |
| void | Submit () |
| Submits the form if the element is part of one. | |
| bool | IsDisabled () |
| Checks if the element is disabled via attributes or properties. | |
| bool | IsEnabled () |
| Checks if the element is enabled. | |
| bool | IsClickable (bool publishEvent=true) |
| Determines whether the element appears clickable based on visibility, disabled state, and CSS. | |
| async Task | DisposeAsync () |
| Asynchronously releases resources (especially Puppeteer object handles). | |
| void | Dispose () |
| Disposes the element (fire-and-forget async cleanup). | |
Properties | |
| Browser.Browser | Browser [get, set] |
| Associated Browser instance. | |
| GPALElement | ShadowRoot [get, set] |
| Shadow root if the element contains one. | |
| Dictionary< string, object > | Attributes = new Dictionary<string, object>(StringComparer.OrdinalIgnoreCase) [get, set] |
| All raw attributes returned from the automation backend. | |
| Dictionary< string, object > | CssAttributes [get, set] |
| CSS computed style properties for the element. | |
| Dictionary< string, object > | DomAttributes [get, set] |
| DOM attributes of the element. | |
| Dictionary< string, object > | DomProperties [get, set] |
| DOM properties of the element. | |
| IWebDriver | WrappedDriver [get, set] |
| The underlying Selenium WebDriver instance. | |
| dynamic | WebElement [get, set] |
| The wrapped Selenium IWebElement or internal dynamic element. | |
| string | ElementHandle [get, set] |
| int | ElementNodeId [get, set] |
| int | ElementBackendNodeId [get, set] |
| Selector | Selector [get, set] |
| Selector used to locate this element. | |
| string | Name [get, set] |
| Name attribute of the element. | |
| string | AttributeName [get, set] |
| Custom attribute name (used internally). | |
| string | TagName [get, set] |
| HTML tag name of the element. | |
| string | Text [get, set] |
| Visible text content of the element. | |
| bool | Enabled [get, set] |
| Whether the element is enabled. | |
| bool | Selected [get, set] |
| Whether the element is selected (e.g. checkboxes, radio buttons). | |
| Point | Location [get, set] |
| Screen coordinates of the element. | |
| Size | Size [get, set] |
| Dimensions of the element. | |
| bool | Displayed [get, set] |
| Whether the element is visible on the page. | |
| string | Href [get, set] |
| href attribute (for links). | |
| string | Src [get, set] |
| src attribute (for images, scripts, etc.). | |
| string | Value [get, set] |
| value attribute (inputs, textareas, etc.). | |
| string | Placeholder [get, set] |
| placeholder attribute. | |
| string | Xpath [get, set] |
| XPath used to locate this element. | |
| XPathInfo[] | Xpaths [get, set] |
| Array of alternative XPaths with match counts. | |
| string | Css [get, set] |
| CSS selector used to locate this element. | |
| string | FullXPath [get, set] |
| Full absolute XPath. | |
| ClientRectangle | BoundingRect [get, set] |
| Client bounding rectangle with detailed coordinates. | |
| string | PageURL [get, set] |
| Current page URL when the element was captured. | |
| string | Type [get, set] |
| The type of the element, for input, this can be many. | |
Pseudo element used in Applications and Browser workflows for image matching and unified automation. Implements IGPALElement and mimics IWebElement where possible.
No methods are implemented on image-only elements. Use this primarily for debugging and image-based actions.
Key properties that are actually used: Location, Size, Text, TagName, WrappedDriver.
Definition at line 142 of file GPALElement.cs.
| void GenerallyPositive.GPALElement.Clear | ( | ) |
Clears the element's value (if supported by underlying element).
Implements GenerallyPositive.IGPALElement.
Definition at line 567 of file GPALElement.cs.
| void GenerallyPositive.GPALElement.Click | ( | ) |
Performs a standard left click.
Implements GenerallyPositive.IGPALElement.
Definition at line 593 of file GPALElement.cs.
| void GenerallyPositive.GPALElement.Click | ( | ModifierKeys | modifierKeys | ) |
Performs a click with optional keyboard modifiers.
Implements GenerallyPositive.IGPALElement.
Definition at line 578 of file GPALElement.cs.
| void GenerallyPositive.GPALElement.Dispose | ( | ) |
Disposes the element (fire-and-forget async cleanup).
Definition at line 808 of file GPALElement.cs.
| async Task GenerallyPositive.GPALElement.DisposeAsync | ( | ) |
Asynchronously releases resources (especially Puppeteer object handles).
Definition at line 783 of file GPALElement.cs.
| IWebElement GenerallyPositive.GPALElement.FindElement | ( | By | by | ) |
Finds a child element using Selenium By locator.
Definition at line 615 of file GPALElement.cs.
| ReadOnlyCollection< IWebElement > GenerallyPositive.GPALElement.FindElements | ( | By | by | ) |
Finds all child elements using Selenium By locator.
Definition at line 623 of file GPALElement.cs.
| string GenerallyPositive.GPALElement.GetAttribute | ( | string | attributeName | ) |
Gets an attribute value with fallback to internal dictionary.
Implements GenerallyPositive.IGPALElement.
Definition at line 631 of file GPALElement.cs.
| string GenerallyPositive.GPALElement.GetCssValue | ( | string | propertyName | ) |
Gets a computed CSS value.
Implements GenerallyPositive.IGPALElement.
Definition at line 678 of file GPALElement.cs.
| string GenerallyPositive.GPALElement.GetDomAttribute | ( | string | attributeName | ) |
Gets a DOM attribute.
Implements GenerallyPositive.IGPALElement.
Definition at line 684 of file GPALElement.cs.
| string GenerallyPositive.GPALElement.GetDomProperty | ( | string | propertyName | ) |
Gets a DOM property.
Implements GenerallyPositive.IGPALElement.
Definition at line 690 of file GPALElement.cs.
| ISearchContext GenerallyPositive.GPALElement.GetShadowRoot | ( | ) |
Returns the ShadowRoot if available.
Definition at line 696 of file GPALElement.cs.
| void GenerallyPositive.GPALElement.Hide | ( | ) |
Hides the element via JavaScript (sets display:none).
Implements GenerallyPositive.IGPALElement.
Definition at line 608 of file GPALElement.cs.
| bool GenerallyPositive.GPALElement.IsClickable | ( | bool | publishEvent = true | ) |
Determines whether the element appears clickable based on visibility, disabled state, and CSS.
| publishEvent | Whether to log a warning if not clickable. |
Implements GenerallyPositive.IGPALElement.
Definition at line 740 of file GPALElement.cs.
| bool GenerallyPositive.GPALElement.IsDisabled | ( | ) |
Checks if the element is disabled via attributes or properties.
Implements GenerallyPositive.IGPALElement.
Definition at line 719 of file GPALElement.cs.
| bool GenerallyPositive.GPALElement.IsEnabled | ( | ) |
Checks if the element is enabled.
Implements GenerallyPositive.IGPALElement.
Definition at line 731 of file GPALElement.cs.
| void GenerallyPositive.GPALElement.MiddleClick | ( | ModifierKeys | modifierKeys = ModifierKeys::NONE | ) |
Performs a middle mouse button click.
Implements GenerallyPositive.IGPALElement.
Definition at line 599 of file GPALElement.cs.
| void GenerallyPositive.GPALElement.SendKeys | ( | string | text | ) |
Sends keystrokes to the element.
Implements GenerallyPositive.IGPALElement.
Definition at line 705 of file GPALElement.cs.
| void GenerallyPositive.GPALElement.SetAttribute | ( | string | attributeName, |
| string | value ) |
Directly sets a DOM attribute on this element via element.setAttribute(attributeName, value), using 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. See Browser.IAllowSetAttributeValue.SetAttribute for the distinction between this and SendString/FillIn*.
| attributeName | Name of the attribute to set (e.g. "disabled", "value", "data-foo") |
| value | Value to assign to the attribute |
Implements GenerallyPositive.IGPALElement.
Definition at line 672 of file GPALElement.cs.
| void GenerallyPositive.GPALElement.Submit | ( | ) |
Submits the form if the element is part of one.
Implements GenerallyPositive.IGPALElement.
Definition at line 712 of file GPALElement.cs.
|
getset |
Custom attribute name (used internally).
Implements GenerallyPositive.IGPALElement.
Definition at line 288 of file GPALElement.cs.
|
getset |
All raw attributes returned from the automation backend.
Implements GenerallyPositive.IGPALElement.
Definition at line 157 of file GPALElement.cs.
|
getset |
Client bounding rectangle with detailed coordinates.
Implements GenerallyPositive.IGPALElement.
Definition at line 433 of file GPALElement.cs.
|
getset |
Associated Browser instance.
Definition at line 147 of file GPALElement.cs.
|
getset |
CSS selector used to locate this element.
Implements GenerallyPositive.IGPALElement.
Definition at line 419 of file GPALElement.cs.
|
getset |
CSS computed style properties for the element.
Implements GenerallyPositive.IGPALElement.
Definition at line 163 of file GPALElement.cs.
|
getset |
Whether the element is visible on the page.
Implements GenerallyPositive.IGPALElement.
Definition at line 347 of file GPALElement.cs.
|
getset |
DOM attributes of the element.
Implements GenerallyPositive.IGPALElement.
Definition at line 192 of file GPALElement.cs.
|
getset |
DOM properties of the element.
Implements GenerallyPositive.IGPALElement.
Definition at line 221 of file GPALElement.cs.
|
getset |
Definition at line 263 of file GPALElement.cs.
|
getset |
Definition at line 261 of file GPALElement.cs.
|
getset |
Definition at line 262 of file GPALElement.cs.
|
getset |
Whether the element is enabled.
Implements GenerallyPositive.IGPALElement.
Definition at line 309 of file GPALElement.cs.
|
getset |
Full absolute XPath.
Implements GenerallyPositive.IGPALElement.
Definition at line 426 of file GPALElement.cs.
|
getset |
href attribute (for links).
Implements GenerallyPositive.IGPALElement.
Definition at line 374 of file GPALElement.cs.
|
getset |
Screen coordinates of the element.
Implements GenerallyPositive.IGPALElement.
Definition at line 323 of file GPALElement.cs.
|
getset |
Name attribute of the element.
Definition at line 281 of file GPALElement.cs.
|
getset |
Current page URL when the element was captured.
Implements GenerallyPositive.IGPALElement.
Definition at line 440 of file GPALElement.cs.
|
getset |
placeholder attribute.
Implements GenerallyPositive.IGPALElement.
Definition at line 395 of file GPALElement.cs.
|
getset |
Whether the element is selected (e.g. checkboxes, radio buttons).
Implements GenerallyPositive.IGPALElement.
Definition at line 316 of file GPALElement.cs.
|
getset |
Selector used to locate this element.
Definition at line 276 of file GPALElement.cs.
|
getset |
Shadow root if the element contains one.
Implements GenerallyPositive.IGPALElement.
Definition at line 152 of file GPALElement.cs.
|
getset |
Dimensions of the element.
Implements GenerallyPositive.IGPALElement.
Definition at line 340 of file GPALElement.cs.
|
getset |
src attribute (for images, scripts, etc.).
Implements GenerallyPositive.IGPALElement.
Definition at line 381 of file GPALElement.cs.
|
getset |
HTML tag name of the element.
Implements GenerallyPositive.IGPALElement.
Definition at line 295 of file GPALElement.cs.
|
getset |
Visible text content of the element.
Implements GenerallyPositive.IGPALElement.
Definition at line 302 of file GPALElement.cs.
|
getset |
The type of the element, for input, this can be many.
Definition at line 447 of file GPALElement.cs.
|
getset |
value attribute (inputs, textareas, etc.).
Implements GenerallyPositive.IGPALElement.
Definition at line 388 of file GPALElement.cs.
|
getset |
The wrapped Selenium IWebElement or internal dynamic element.
Implements GenerallyPositive.IGPALElement.
Definition at line 255 of file GPALElement.cs.
|
getset |
The underlying Selenium WebDriver instance.
Definition at line 249 of file GPALElement.cs.
|
getset |
XPath used to locate this element.
Implements GenerallyPositive.IGPALElement.
Definition at line 402 of file GPALElement.cs.
|
getset |
Array of alternative XPaths with match counts.
Implements GenerallyPositive.IGPALElement.
Definition at line 409 of file GPALElement.cs.