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

Everything revolves around the Unit of Work.
A Unit of Work is defined as one or more selectors between actions (GoTo, Run, LeftClick, Hover, etc.)
Use this only for debugging. More...

Classes

class  WebElementWithType
 add iframe and shadow dom elements in order to navigate them before finding a web element
class  ElementNode

Properties

List< SelectorWithSelectorList = null [get, set]
 List of With selectors Use .WithSelector to add selectors to this list.
List< SelectorInSelectorList = null [get, set]
 List of iframe or shadow dom selectors. Set using .InFrame() or .InShadowDom() Use .InFrame to add frames to this list.
Selector CurrentSelector = null [get, set]
 The current selector being used from the current UOW. The selectors are iterated in declared order.
Selector NextPageButton = null [get, set]
 The next page button. When scraping multiple pages of results, this element is pressed for a new page of results.
Use with .WithPages() to retrieve multiple pages of data.
Use .WithNextPageButton to set this value Use .WithInfiniteScroll if there is no next page button, and to go to page end to load a new page of results.
bool InfiniteScroll = false [get, set]
 Go to page end to get the next page of results.
Use with .WithPages() to retrieve multiple pages of data.
Use .WithNextPageButton() if there is a next page button for more results. Use .WithInfiniteScroll to set this value.
int PageCount = 1 [get, set]
 Number of pages to retrieve. Default is 1 page.
Use .WithPages() to set this value.
List< string > TokenList = null [get, set]
 Input data grid retrieved from a file or database.
A grid is rows and columns. Each column value is a token to consume.
If not enough or too many tokens are present on a line for the defined elements, an Information Channel message will be broadcast indicating either not enough or too many tokens are supplied.
List< string > HeaderList = null [get, set]
 Output header list, Defined using .WithHeader or, if not supplied, from the names given to selectors.
If no headers are supplied, this is filled from selector names only on file save methods.
If no headers or selector names are supplied, no header will be output.
If not enough headers are supplied for the columns of output, an Information Channel message will be broadcast stating as much.
bool PartialMatch = false [get, set]
 Only relevant if there is a match criteria or matching function.
Of all the found selectors, was there only a partial match?
If there is no match criteria/function, this is always false and matched and found results are the same.
bool ActionCalled = false [get, set]
 Has an action been called on the current unit of work?
If true, then the next .WithSelector() will create a new UOW.
int WithAllThatMatch = int.MaxValue [get, set]
 Controls whether the selectors in scope are multiple elements on screen, and to get all
Use .WithAllThatMatch to set this value.
CallIfStatus CallIfFoundHandled = CallIfStatus.NotHandled [get, set]
CallIfStatus CallIfNotFoundHandled = CallIfStatus.NotHandled [get, set]
CallIfStatus AppCallIfFoundHandled = CallIfStatus.NotHandled [get, set]
CallIfStatus AppCallIfNotFoundHandled = CallIfStatus.NotHandled [get, set]
GPALFile InputFile [get, set]
 The input File from which to consume tokens.
This is set using any [Append/FillIn/Insert]FromFile method
Tokens are loaded when the file is loaded.
IGPALDatabase InputDatabase [get, set]
 The input database from which to consume tokens.
This is set using any [Append/FillIn/Insert]FromDatabase method
Tokens are loaded when the database is loaded.
Browser.Browser Browser [get, set]

Detailed Description

Everything revolves around the Unit of Work.
A Unit of Work is defined as one or more selectors between actions (GoTo, Run, LeftClick, Hover, etc.)
Use this only for debugging.

Definition at line 38 of file UnitOfWork.cs.

Property Documentation

◆ ActionCalled

bool GenerallyPositive.UnitOfWork.ActionCalled = false
getset

Has an action been called on the current unit of work?
If true, then the next .WithSelector() will create a new UOW.

Returns
True if action has been called.
False if no action has been called.

Definition at line 161 of file UnitOfWork.cs.

◆ AppCallIfFoundHandled

CallIfStatus GenerallyPositive.UnitOfWork.AppCallIfFoundHandled = CallIfStatus.NotHandled
getset

Definition at line 201 of file UnitOfWork.cs.

◆ AppCallIfNotFoundHandled

CallIfStatus GenerallyPositive.UnitOfWork.AppCallIfNotFoundHandled = CallIfStatus.NotHandled
getset

Definition at line 202 of file UnitOfWork.cs.

◆ Browser

Browser.Browser GenerallyPositive.UnitOfWork.Browser
getset

Definition at line 219 of file UnitOfWork.cs.

◆ CallIfFoundHandled

CallIfStatus GenerallyPositive.UnitOfWork.CallIfFoundHandled = CallIfStatus.NotHandled
getset

Definition at line 199 of file UnitOfWork.cs.

◆ CallIfNotFoundHandled

CallIfStatus GenerallyPositive.UnitOfWork.CallIfNotFoundHandled = CallIfStatus.NotHandled
getset

Definition at line 200 of file UnitOfWork.cs.

◆ CurrentSelector

Selector GenerallyPositive.UnitOfWork.CurrentSelector = null
getset

The current selector being used from the current UOW. The selectors are iterated in declared order.

Returns
The current selector

Definition at line 58 of file UnitOfWork.cs.

◆ HeaderList

List<string> GenerallyPositive.UnitOfWork.HeaderList = null
getset

Output header list, Defined using .WithHeader or, if not supplied, from the names given to selectors.
If no headers are supplied, this is filled from selector names only on file save methods.
If no headers or selector names are supplied, no header will be output.
If not enough headers are supplied for the columns of output, an Information Channel message will be broadcast stating as much.

Returns
A list of the headers defined.

Definition at line 145 of file UnitOfWork.cs.

◆ InfiniteScroll

bool GenerallyPositive.UnitOfWork.InfiniteScroll = false
getset

Go to page end to get the next page of results.
Use with .WithPages() to retrieve multiple pages of data.
Use .WithNextPageButton() if there is a next page button for more results. Use .WithInfiniteScroll to set this value.

Returns
True if this page uses infinite scroll,
False [default] this page is not infinite.

Definition at line 74 of file UnitOfWork.cs.

◆ InputDatabase

IGPALDatabase GenerallyPositive.UnitOfWork.InputDatabase
getset

The input database from which to consume tokens.
This is set using any [Append/FillIn/Insert]FromDatabase method
Tokens are loaded when the database is loaded.

Returns
The input GPAL File

Definition at line 217 of file UnitOfWork.cs.

◆ InputFile

GPALFile GenerallyPositive.UnitOfWork.InputFile
getset

The input File from which to consume tokens.
This is set using any [Append/FillIn/Insert]FromFile method
Tokens are loaded when the file is loaded.

Returns
The input GPAL File

Definition at line 210 of file UnitOfWork.cs.

◆ InSelectorList

List<Selector> GenerallyPositive.UnitOfWork.InSelectorList = null
getset

List of iframe or shadow dom selectors. Set using .InFrame() or .InShadowDom() Use .InFrame to add frames to this list.

Returns
List of selectors

Definition at line 53 of file UnitOfWork.cs.

◆ NextPageButton

Selector GenerallyPositive.UnitOfWork.NextPageButton = null
getset

The next page button. When scraping multiple pages of results, this element is pressed for a new page of results.
Use with .WithPages() to retrieve multiple pages of data.
Use .WithNextPageButton to set this value Use .WithInfiniteScroll if there is no next page button, and to go to page end to load a new page of results.

Returns
The next page button selector

Definition at line 66 of file UnitOfWork.cs.

◆ PageCount

int GenerallyPositive.UnitOfWork.PageCount = 1
getset

Number of pages to retrieve. Default is 1 page.
Use .WithPages() to set this value.

Returns
The number of pages set to retrieve.

Definition at line 80 of file UnitOfWork.cs.

◆ PartialMatch

bool GenerallyPositive.UnitOfWork.PartialMatch = false
getset

Only relevant if there is a match criteria or matching function.
Of all the found selectors, was there only a partial match?
If there is no match criteria/function, this is always false and matched and found results are the same.

Returns
True if not all found matched.
False if all found results matched the match criteria.

Definition at line 153 of file UnitOfWork.cs.

◆ TokenList

List<string> GenerallyPositive.UnitOfWork.TokenList = null
getset

Input data grid retrieved from a file or database.
A grid is rows and columns. Each column value is a token to consume.
If not enough or too many tokens are present on a line for the defined elements, an Information Channel message will be broadcast indicating either not enough or too many tokens are supplied.

Returns
A grid of tokens loaded from the data source

Definition at line 96 of file UnitOfWork.cs.

◆ WithAllThatMatch

int GenerallyPositive.UnitOfWork.WithAllThatMatch = int.MaxValue
getset

Controls whether the selectors in scope are multiple elements on screen, and to get all
Use .WithAllThatMatch to set this value.

Returns
True to match multiple elements on page.
False to only match the first element(s) found.

Definition at line 171 of file UnitOfWork.cs.

◆ WithSelectorList

List<Selector> GenerallyPositive.UnitOfWork.WithSelectorList = null
getset

List of With selectors Use .WithSelector to add selectors to this list.

Returns
List of selectors

Definition at line 45 of file UnitOfWork.cs.


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