GPAL - Generally Positive Automation Library v1.0
GPAL The Fluent Automation LIbrary
Loading...
Searching...
No Matches
GenerallyPositive.Selector Class Reference

GPAL Selector used to locate Application and Browser elements.
Instantiated with GPAL.Selector. More...

Inheritance diagram for GenerallyPositive.Selector:
GenerallyPositive.IAllowSelectorSettings GenerallyPositive.IAllowCallBack GenerallyPositive.IAllowToGPALObject< TResult >

Public Member Functions

Selector ToGPALObject ()
delegate CallIfStatus webMatchingFunction (List< IGPALElement > foundElements, out List< IGPALElement > matchedElements, out bool matchedAll, Selector selector, bool ExactMatch=true)
 Custom matching function, must return all matched elements and an indicator as to whether all elements matched (for the purpose of the custom match)
More than one custom matching method can be define, they will be chained based upon the return value.
delegate CallIfStatus appMatchingFunction (List< GPALAutomationElement > foundElements, out List< GPALAutomationElement > matchedElements, out bool matchedAll, Selector selector, bool ExactMatch=true)
 Custom matching function, must return all matched elements and an indicator as to whether all elements matched (for the purpose of the custom match)
More than one custom matching method can be define, they will be chained based upon the return value.
IAllowSelectorSettings WithCSS (string css)
 Define CSS used to find elements.
Browser only.
IAllowSelectorSettings WithXPath (string xPath)
 Define XPath used to find elements
Both.
IAllowSelectorSettings WithText (string text)
 Define Text used to find elements by text attribute.
Browser only.
IAllowSelectorSettings WithValue (string value)
 Define Value used to find elements by value attribute.
Browser only.
IAllowSelectorSettings WithName (string name)
 Define Name used to find elements by name attribute.
Application only.
IAllowSelectorSettings WithClassName (string className)
 Define Name used to find elements by name attribute.
Application only.
IAllowSelectorSettings WithAutomationID (string automationID)
 Define Name used to find elements by name attribute.
Application only.
IAllowSelectorSettings WithImage (string base64String)
 Define an image to match on-screen.
The top left corner is used as the start of the element.
Image matching forces hardware interaction with this element.
IAllowSelectorSettings WithImage (Image image)
 Define an image to match on-screen.
The top left corner is used as the start of the element.
Image matching forces hardware interaction with this element.
IAllowSelectorSettings WithSearchForSelector (bool searchForElement)
 Search for a matching image when using hardware emulation or image matching.
Finding an element on page involves scrolling down the page (sending Page Down key presses).
.
IAllowSelectorSettings WithSelectorName (string name)
 A common name for this selector.
Used in Information and Exception channel messages.
IAllowSelectorSettings WithDeltaX (int deltaX)
 Define the x offset from the Top Left corner to perform clicks.
IAllowSelectorSettings WithDeltaY (int deltaY)
 Define the y offset from the Top Left corner to perform clicks.
IAllowSelectorSettings WithOffsetX (int offsetX)
 Define the x offset from the Top Left corner to perform clicks.
IAllowSelectorSettings WithOffsetY (int offsetY)
 Define the y offset from the Top Left corner to perform clicks.
IAllowSelectorSettings WithSimulateMouse (bool moveWithArc)
 Simulate a human moving the mouse when interacting with this element. Implies hardware input.
IAllowSelectorSettings UseAttribute (string attributeName)
IAllowSelectorSettings MatchFunction (Selector.appMatchingFunction matchingFunction)
 Your custom application element matching function to examine found elements and return only those you 'match'.
IAllowSelectorSettings MatchFunction (Selector.webMatchingFunction matchingFunction)
 Your custom web element matching function to examine found elements and return only those you 'match'.
IAllowSelectorSettings MatchAttribute (string attributeToMatch)
 Found elements must have attribute supplied in order to interact with them.
IAllowSelectorSettings MatchAttributeRegex (string attributeToMatch)
 Found elements must have the attribute specified by regular expression in order to interact with them.
IAllowSelectorSettings MatchHRef (string hrefToMatch)
 Found elements must match the HRef supplied in order to interact with them.
IAllowSelectorSettings MatchHRefRegex (string hrefToMatch)
 Found elements must match the HRef regular expression supplied in order to interact with them.
IAllowSelectorSettings MatchPlaceholder (string placeholderToMatch)
 Found elements must match the placeholder supplied in order to interact with them.
IAllowSelectorSettings MatchPlaceholderRegex (string placeholderToMatch)
 Found elements must match the placeholder regular expression supplied in order to interact with them.
IAllowSelectorSettings MatchSrc (string srcToMatch)
 Found elements must match the src supplied in order to interact with them.
IAllowSelectorSettings MatchSrcRegex (string srcToMatch)
 Found elements must match the src regular expression supplied in order to interact with them.
IAllowSelectorSettings MatchText (string textToMatch)
 Found elements must match the text supplied in order to interact with them.
IAllowSelectorSettings MatchTextRegex (string textToMatch)
 Found elements must match the text regular expression supplied in order to interact with them.
IAllowSelectorSettings MatchValue (string valueToMatch)
 Found elements must match the value supplied in order to interact with them.
IAllowSelectorSettings MatchValueRegex (string valueToMatch)
 Found elements must match the value regular expression supplied in order to interact with them.
void Remove ()
 Remove this selector from the current Unit of Work.
IAllowSelectorSettings WithOCR (string textToFind)
 Use OCR to find the text on-screen.
IAllowSelectorSettings WithStopOnNotFound (bool stopOnNotFound)
 Stop the workflow if this selector is not found.
IAllowSelectorSettings CallIfFound (CallIfDelegate callIfFound)
IAllowSelectorSettings CallIfNotFound (CallIfDelegate callIfNotFound)
IAllowSelectorSettings WithImage (GPALFile imageToFindPath)
 Define an image to match on-screen.
The top left corner is used as the start of the element.
Image matching forces hardware interaction with this element.
IAllowSelectorSettings WithHRef (string HRefFullOrPartial)
IAllowSelectorSettings ContainsAttribute (string attributeToMatch)
IAllowSelectorSettings ContainsHRef (string hrefToMatch)
IAllowSelectorSettings ContainsPlaceholder (string placeholderToMatch)
IAllowSelectorSettings ContainsSrc (string srcToMatch)
IAllowSelectorSettings ContainsText (string textToMatch)
IAllowSelectorSettings ContainsValue (string valueToMatch)
Public Member Functions inherited from GenerallyPositive.IAllowCallBack
IAllowSelectorSettings CallIfFound (Browser.Browser.CallIfDelegate CallIfFound)
IAllowSelectorSettings CallIfNotFound (Browser.Browser.CallIfDelegate CallIfNotFound)

Static Public Member Functions

static implicit operator string (Selector sel)
static implicit operator Selector (string selectorString)
static bool IsLikelyXPath (string s)
 Rudimentary but reasonably effective guess: is this string more likely an XPath than a CSS selector?

Properties

SelectorSettings SelectorSettings [get, set]
SelectorType SelectorType [get, set]
IAllowSelectorSettings WithHardware [get]
 Interact with this element using hardware emulation.
IAllowSelectorSettings WithJavaScript [get]
 Interact with this element using javascript injected into the page.
IAllowSelectorSettings WithJavascript [get]
IAllowSelectorSettings WithSelenium [get]
 Interact with this element using Selenium [default].
int ElementsFoundAndMatchedCount [get, set]
 Count of elements found for this selector (after match).
InteractionType InteractionType [get, set]
 Defined method to interact with this element.
NOTE: This can be overridden in the workflow.
Browser.Browser Browser [get, set]
 Browser associated with this selector.
string SelectorPath [get]
 Returns the first defined selector path string.
List< SelectorSettings.SelectorPathEntrySelectorPaths [get]
 The selector paths defined to locate elements.
bool SearchForSelector [get]
 Search for elements on the page.
int OffsetX [get, set]
 X offset from the top left corner to interact with the element, image match included. Also used in drag-and-drop as the grab point the DeltaX moves from.
int OffsetY [get, set]
 Y offset fromm the top left corner to interact with the element, image match included. Also used in drag-and-drop as the grab point the DeltaY moves from.
int DeltaX [get, set]
 Drag-and-drop deltaX to move from the elemenet.X + OffsetX.
int DeltaY [get, set]
 Drag-and-drop deltaY to move from the elemenet.Y + OffsetY.
string Name [get, set]
 The name you gave this selector, or one assigned by GPAL [selector1, selector2...]
Used in Information and Exception channel messages.
Also used as column headers when saving to a file.
bool SimulateMouse [get]
 Simulate moving the mouse to interact with this element?
bool StopOnNotFound [get]
 Stop the workflow if no elements are found for this selector.
List< GPALElementWebSelectorFoundResults [get, set]
List< GPALElementWebSelectorMatchedResults [get, set]

Detailed Description

GPAL Selector used to locate Application and Browser elements.
Instantiated with GPAL.Selector.

Definition at line 55 of file Selector.cs.

Member Function Documentation

◆ appMatchingFunction()

delegate CallIfStatus GenerallyPositive.Selector.appMatchingFunction ( List< GPALAutomationElement > foundElements,
out List< GPALAutomationElement > matchedElements,
out bool matchedAll,
Selector selector,
bool ExactMatch = true )

Custom matching function, must return all matched elements and an indicator as to whether all elements matched (for the purpose of the custom match)
More than one custom matching method can be define, they will be chained based upon the return value.

Parameters
foundElementsAll elements found for the selector
matchedElementsAll matched elements (or all found)
matchedAllTrue if all found elements matched.
False for only partial match.
selectorThe selector used for the found elements
Returns
0: not handled, try next handler
1: handled, do not try another handler
-2: we don't like this set, try the next selector path
-1: error/exit

◆ CallIfFound()

IAllowSelectorSettings GenerallyPositive.Selector.CallIfFound ( CallIfDelegate callIfFound)

Definition at line 547 of file Selector.cs.

◆ CallIfNotFound()

IAllowSelectorSettings GenerallyPositive.Selector.CallIfNotFound ( CallIfDelegate callIfNotFound)

Definition at line 552 of file Selector.cs.

◆ ContainsAttribute()

IAllowSelectorSettings GenerallyPositive.Selector.ContainsAttribute ( string attributeToMatch)

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 1097 of file Selector.cs.

◆ ContainsHRef()

IAllowSelectorSettings GenerallyPositive.Selector.ContainsHRef ( string hrefToMatch)

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 1105 of file Selector.cs.

◆ ContainsPlaceholder()

IAllowSelectorSettings GenerallyPositive.Selector.ContainsPlaceholder ( string placeholderToMatch)

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 1113 of file Selector.cs.

◆ ContainsSrc()

IAllowSelectorSettings GenerallyPositive.Selector.ContainsSrc ( string srcToMatch)

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 1121 of file Selector.cs.

◆ ContainsText()

IAllowSelectorSettings GenerallyPositive.Selector.ContainsText ( string textToMatch)

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 1129 of file Selector.cs.

◆ ContainsValue()

IAllowSelectorSettings GenerallyPositive.Selector.ContainsValue ( string valueToMatch)

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 1137 of file Selector.cs.

◆ IsLikelyXPath()

bool GenerallyPositive.Selector.IsLikelyXPath ( string s)
static

Rudimentary but reasonably effective guess: is this string more likely an XPath than a CSS selector?

Definition at line 1042 of file Selector.cs.

◆ MatchAttribute()

IAllowSelectorSettings GenerallyPositive.Selector.MatchAttribute ( string attributeToMatch)

Found elements must have attribute supplied in order to interact with them.

Parameters
attributeToMatchtext to match
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 394 of file Selector.cs.

◆ MatchAttributeRegex()

IAllowSelectorSettings GenerallyPositive.Selector.MatchAttributeRegex ( string attributeToMatch)

Found elements must have the attribute specified by regular expression in order to interact with them.

Parameters
attributeToMatchtext to match
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 405 of file Selector.cs.

◆ MatchFunction() [1/2]

IAllowSelectorSettings GenerallyPositive.Selector.MatchFunction ( Selector.appMatchingFunction matchingFunction)

Your custom application element matching function to examine found elements and return only those you 'match'.

Parameters
matchingFunctionYour matching function
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 372 of file Selector.cs.

◆ MatchFunction() [2/2]

IAllowSelectorSettings GenerallyPositive.Selector.MatchFunction ( Selector.webMatchingFunction matchingFunction)

Your custom web element matching function to examine found elements and return only those you 'match'.

Parameters
matchingFunctionYour matching function
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 383 of file Selector.cs.

◆ MatchHRef()

IAllowSelectorSettings GenerallyPositive.Selector.MatchHRef ( string hrefToMatch)

Found elements must match the HRef supplied in order to interact with them.

Parameters
hrefToMatchHRef to match
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 416 of file Selector.cs.

◆ MatchHRefRegex()

IAllowSelectorSettings GenerallyPositive.Selector.MatchHRefRegex ( string hrefToMatch)

Found elements must match the HRef regular expression supplied in order to interact with them.

Parameters
hrefToMatchHRef to match
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 427 of file Selector.cs.

◆ MatchPlaceholder()

IAllowSelectorSettings GenerallyPositive.Selector.MatchPlaceholder ( string placeholderToMatch)

Found elements must match the placeholder supplied in order to interact with them.

Parameters
placeholderToMatchPlaceholder to match
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 438 of file Selector.cs.

◆ MatchPlaceholderRegex()

IAllowSelectorSettings GenerallyPositive.Selector.MatchPlaceholderRegex ( string placeholderToMatch)

Found elements must match the placeholder regular expression supplied in order to interact with them.

Parameters
placeholderToMatch
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 449 of file Selector.cs.

◆ MatchSrc()

IAllowSelectorSettings GenerallyPositive.Selector.MatchSrc ( string srcToMatch)

Found elements must match the src supplied in order to interact with them.

Parameters
srcToMatchSrc to match
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 460 of file Selector.cs.

◆ MatchSrcRegex()

IAllowSelectorSettings GenerallyPositive.Selector.MatchSrcRegex ( string srcToMatch)

Found elements must match the src regular expression supplied in order to interact with them.

Parameters
srcToMatchSrc to match
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 471 of file Selector.cs.

◆ MatchText()

IAllowSelectorSettings GenerallyPositive.Selector.MatchText ( string textToMatch)

Found elements must match the text supplied in order to interact with them.

Parameters
textToMatchText to match
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 482 of file Selector.cs.

◆ MatchTextRegex()

IAllowSelectorSettings GenerallyPositive.Selector.MatchTextRegex ( string textToMatch)

Found elements must match the text regular expression supplied in order to interact with them.

Parameters
textToMatchText to match
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 493 of file Selector.cs.

◆ MatchValue()

IAllowSelectorSettings GenerallyPositive.Selector.MatchValue ( string valueToMatch)

Found elements must match the value supplied in order to interact with them.

Parameters
valueToMatchValue to match
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 504 of file Selector.cs.

◆ MatchValueRegex()

IAllowSelectorSettings GenerallyPositive.Selector.MatchValueRegex ( string valueToMatch)

Found elements must match the value regular expression supplied in order to interact with them.

Parameters
valueToMatchValue to match
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 515 of file Selector.cs.

◆ operator Selector()

implicit GenerallyPositive.Selector.operator Selector ( string selectorString)
static

Definition at line 982 of file Selector.cs.

◆ operator string()

implicit GenerallyPositive.Selector.operator string ( Selector sel)
static

Definition at line 976 of file Selector.cs.

◆ Remove()

void GenerallyPositive.Selector.Remove ( )

Remove this selector from the current Unit of Work.

Definition at line 524 of file Selector.cs.

◆ ToGPALObject()

Selector GenerallyPositive.Selector.ToGPALObject ( )

Implements GenerallyPositive.IAllowToGPALObject< TResult >.

Definition at line 85 of file Selector.cs.

◆ UseAttribute()

IAllowSelectorSettings GenerallyPositive.Selector.UseAttribute ( string attributeName)

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 362 of file Selector.cs.

◆ webMatchingFunction()

delegate CallIfStatus GenerallyPositive.Selector.webMatchingFunction ( List< IGPALElement > foundElements,
out List< IGPALElement > matchedElements,
out bool matchedAll,
Selector selector,
bool ExactMatch = true )

Custom matching function, must return all matched elements and an indicator as to whether all elements matched (for the purpose of the custom match)
More than one custom matching method can be define, they will be chained based upon the return value.

Parameters
foundElementsAll elements found for the selector
matchedElementsAll matched elements (or all found)
matchedAllTrue if all found elements matched.
False for only partial match.
selectorThe selector used for the found elements
Returns
0: not handled, try next handler
1: handled, do not try another handler
-2: we don't like this set, try the next selector path
-1: error/exit

◆ WithAutomationID()

IAllowSelectorSettings GenerallyPositive.Selector.WithAutomationID ( string automationID)

Define Name used to find elements by name attribute.
Application only.

Parameters
NameThe name
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 240 of file Selector.cs.

◆ WithClassName()

IAllowSelectorSettings GenerallyPositive.Selector.WithClassName ( string className)

Define Name used to find elements by name attribute.
Application only.

Parameters
NameThe name
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 228 of file Selector.cs.

◆ WithCSS()

IAllowSelectorSettings GenerallyPositive.Selector.WithCSS ( string css)

Define CSS used to find elements.
Browser only.

Parameters
cssThe CSS
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 168 of file Selector.cs.

◆ WithDeltaX()

IAllowSelectorSettings GenerallyPositive.Selector.WithDeltaX ( int deltaX)

Define the x offset from the Top Left corner to perform clicks.

Parameters
offsetXX offset
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 310 of file Selector.cs.

◆ WithDeltaY()

IAllowSelectorSettings GenerallyPositive.Selector.WithDeltaY ( int deltaY)

Define the y offset from the Top Left corner to perform clicks.

Parameters
offsetYY offset
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 321 of file Selector.cs.

◆ WithHRef()

IAllowSelectorSettings GenerallyPositive.Selector.WithHRef ( string HRefFullOrPartial)

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 575 of file Selector.cs.

◆ WithImage() [1/3]

IAllowSelectorSettings GenerallyPositive.Selector.WithImage ( GPALFile imageToFindPath)

Define an image to match on-screen.
The top left corner is used as the start of the element.
Image matching forces hardware interaction with this element.

Parameters
imagePathFilename of the image to load
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 565 of file Selector.cs.

◆ WithImage() [2/3]

IAllowSelectorSettings GenerallyPositive.Selector.WithImage ( Image image)

Define an image to match on-screen.
The top left corner is used as the start of the element.
Image matching forces hardware interaction with this element.

Parameters
imageThe image to match
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 274 of file Selector.cs.

◆ WithImage() [3/3]

IAllowSelectorSettings GenerallyPositive.Selector.WithImage ( string base64String)

Define an image to match on-screen.
The top left corner is used as the start of the element.
Image matching forces hardware interaction with this element.

Parameters
imagePathFilename of the image to load
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 253 of file Selector.cs.

◆ WithName()

IAllowSelectorSettings GenerallyPositive.Selector.WithName ( string name)

Define Name used to find elements by name attribute.
Application only.

Parameters
NameThe name
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 216 of file Selector.cs.

◆ WithOCR()

IAllowSelectorSettings GenerallyPositive.Selector.WithOCR ( string textToFind)

Use OCR to find the text on-screen.

Parameters
textToFindText to find
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 533 of file Selector.cs.

◆ WithOffsetX()

IAllowSelectorSettings GenerallyPositive.Selector.WithOffsetX ( int offsetX)

Define the x offset from the Top Left corner to perform clicks.

Parameters
offsetXX offset
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 332 of file Selector.cs.

◆ WithOffsetY()

IAllowSelectorSettings GenerallyPositive.Selector.WithOffsetY ( int offsetY)

Define the y offset from the Top Left corner to perform clicks.

Parameters
offsetYY offset
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 343 of file Selector.cs.

◆ WithSearchForSelector()

IAllowSelectorSettings GenerallyPositive.Selector.WithSearchForSelector ( bool searchForElement)

Search for a matching image when using hardware emulation or image matching.
Finding an element on page involves scrolling down the page (sending Page Down key presses).
.

Parameters
searchForElementTrue to search for the element/image
False to just look on the current page.
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 287 of file Selector.cs.

◆ WithSelectorName()

IAllowSelectorSettings GenerallyPositive.Selector.WithSelectorName ( string name)

A common name for this selector.
Used in Information and Exception channel messages.

Parameters
nameThe selector name
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 299 of file Selector.cs.

◆ WithSimulateMouse()

IAllowSelectorSettings GenerallyPositive.Selector.WithSimulateMouse ( bool moveWithArc)

Simulate a human moving the mouse when interacting with this element. Implies hardware input.

Parameters
moveWithArcTrue to move the mouse to the element.
False [default] jump the mouse to the element.
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 354 of file Selector.cs.

◆ WithStopOnNotFound()

IAllowSelectorSettings GenerallyPositive.Selector.WithStopOnNotFound ( bool stopOnNotFound)

Stop the workflow if this selector is not found.

Parameters
stopOnNotFoundTrue to stop the workflow.
False [default] continue the workflow.
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 542 of file Selector.cs.

◆ WithText()

IAllowSelectorSettings GenerallyPositive.Selector.WithText ( string text)

Define Text used to find elements by text attribute.
Browser only.

Parameters
textThe text
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 192 of file Selector.cs.

◆ WithValue()

IAllowSelectorSettings GenerallyPositive.Selector.WithValue ( string value)

Define Value used to find elements by value attribute.
Browser only.

Parameters
valueThe value
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 204 of file Selector.cs.

◆ WithXPath()

IAllowSelectorSettings GenerallyPositive.Selector.WithXPath ( string xPath)

Define XPath used to find elements
Both.

Parameters
xPathThe XPath
Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 180 of file Selector.cs.

Property Documentation

◆ Browser

Browser.Browser GenerallyPositive.Selector.Browser
getset

Browser associated with this selector.

Returns
The browser used

Definition at line 745 of file Selector.cs.

◆ DeltaX

int GenerallyPositive.Selector.DeltaX
getset

Drag-and-drop deltaX to move from the elemenet.X + OffsetX.

Returns
X delta

Definition at line 825 of file Selector.cs.

◆ DeltaY

int GenerallyPositive.Selector.DeltaY
getset

Drag-and-drop deltaY to move from the elemenet.Y + OffsetY.

Returns
Y delta

Definition at line 840 of file Selector.cs.

◆ ElementsFoundAndMatchedCount

int GenerallyPositive.Selector.ElementsFoundAndMatchedCount
getset

Count of elements found for this selector (after match).

Definition at line 638 of file Selector.cs.

◆ InteractionType

InteractionType GenerallyPositive.Selector.InteractionType
getset

Defined method to interact with this element.
NOTE: This can be overridden in the workflow.

Returns
Hardware, JavaScript, Selenium

Definition at line 730 of file Selector.cs.

◆ Name

string GenerallyPositive.Selector.Name
getset

The name you gave this selector, or one assigned by GPAL [selector1, selector2...]
Used in Information and Exception channel messages.
Also used as column headers when saving to a file.

Returns
The name of the selector.

Definition at line 857 of file Selector.cs.

◆ OffsetX

int GenerallyPositive.Selector.OffsetX
getset

X offset from the top left corner to interact with the element, image match included. Also used in drag-and-drop as the grab point the DeltaX moves from.

Returns
X offset.

Definition at line 794 of file Selector.cs.

◆ OffsetY

int GenerallyPositive.Selector.OffsetY
getset

Y offset fromm the top left corner to interact with the element, image match included. Also used in drag-and-drop as the grab point the DeltaY moves from.

Returns
Y offset.

Definition at line 810 of file Selector.cs.

◆ SearchForSelector

bool GenerallyPositive.Selector.SearchForSelector
get

Search for elements on the page.

Returns
True to search for the element/image
False to just look on the current page.

Definition at line 782 of file Selector.cs.

◆ SelectorPath

string GenerallyPositive.Selector.SelectorPath
get

Returns the first defined selector path string.

Definition at line 753 of file Selector.cs.

◆ SelectorPaths

List<SelectorSettings.SelectorPathEntry> GenerallyPositive.Selector.SelectorPaths
get

The selector paths defined to locate elements.

Returns
The selector paths defined to locate elements

Definition at line 764 of file Selector.cs.

◆ SelectorSettings

SelectorSettings GenerallyPositive.Selector.SelectorSettings
getset

Definition at line 59 of file Selector.cs.

◆ SelectorType

SelectorType GenerallyPositive.Selector.SelectorType
getset

Definition at line 71 of file Selector.cs.

◆ SimulateMouse

bool GenerallyPositive.Selector.SimulateMouse
get

Simulate moving the mouse to interact with this element?

Returns
True to move the mouse to elements.
False [default] jump the mouse to elements.

Definition at line 920 of file Selector.cs.

◆ StopOnNotFound

bool GenerallyPositive.Selector.StopOnNotFound
get

Stop the workflow if no elements are found for this selector.

Returns
True to stop the workflow.
False [default] continue the workflow.

Definition at line 931 of file Selector.cs.

◆ WebSelectorFoundResults

List<GPALElement> GenerallyPositive.Selector.WebSelectorFoundResults
getset

Definition at line 939 of file Selector.cs.

◆ WebSelectorMatchedResults

List<GPALElement> GenerallyPositive.Selector.WebSelectorMatchedResults
getset

Definition at line 955 of file Selector.cs.

◆ WithHardware

IAllowSelectorSettings GenerallyPositive.Selector.WithHardware
get

Interact with this element using hardware emulation.

Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 589 of file Selector.cs.

◆ WithJavaScript

IAllowSelectorSettings GenerallyPositive.Selector.WithJavaScript
get

Interact with this element using javascript injected into the page.

Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 602 of file Selector.cs.

◆ WithJavascript

IAllowSelectorSettings GenerallyPositive.Selector.WithJavascript
get

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 612 of file Selector.cs.

◆ WithSelenium

IAllowSelectorSettings GenerallyPositive.Selector.WithSelenium
get

Interact with this element using Selenium [default].

Returns
Fluent interface to define the selector more

Implements GenerallyPositive.IAllowSelectorSettings.

Definition at line 625 of file Selector.cs.


The documentation for this class was generated from the following file: