![]() |
GPAL - Generally Positive Automation Library v1.0
GPAL The Fluent Automation LIbrary
|
Application object that contains the fluent methods to create your Application workflow.
Instantiated using GPAL.Application.
More...
Public Member Functions | |
| delegate CallIfStatus | CallIfDelegate (Application application, List< IGPALAutomationElement > foundElements, List< IGPALAutomationElement > matchedElements, Selector selector, bool matchedAll) |
| Delegate callback for the CallIfFound/CallIfNotFound EventHandlers which will be invoked when a selector is found/not found CallIf handlers may be defined at two levels: At each selector or for a Unit of Work (UOW) [will be invoked for each Selector in the UOW] A UOW is defined as all Selectors between actions (first action is Open) More than one callback handler can be defined and subsequent handlers will only be invoked based upon return code values. | |
| delegate CallIfStatus | CallAfterFillInDelegate (Application application, IGPALGrid< string > tokens, int tokenIdx) |
| Delegate callback for the CallAfterFillIn EventHandler which will be invoked after each row of tokens is consumed. Invoked whenever FillInFrom/FilllInFromDatabase/FillInFrom are used. | |
| Application | ToGPALObject () |
| Return a GPAL.Application object so that GPAL.Application does not have to be cast. | |
| IAllowAllApplicationAndAllSelector | ResizeWindow (int width, int height) |
| Resize the window last matched by WaitForWindow to the specified pixel dimensions. | |
| IAllowAllApplicationAndAllSelector | MoveWindow (int x, int y) |
| Move the window last matched by WaitForWindow to the specified screen coordinates. | |
| IAllowSelectorActionOrAnySelector | AppendFrom (GPALDatabase inputDatabase) |
| Append the data from the database to the end of the input Selectors defined in the UOW One token (one column in the current row) per per input. If .WithAllThatMatch is defined on the current UOW, then the token is entered into {num} inputs that matches the corresponding Selector in the current UOW. If CallAfterFillIn callback is defined, it will be called after each row is consumed and the text is input. | |
| IAllowSelectorActionOrAnySelector | AppendFrom (GPALFile inputFile) |
| Append the data from the input file to the end of the input Selectors defined in the UOW One token (one string [between commas] from the current row) per per input. If .WithAllThatMatch is defined on the current UOW, then the token is entered into {num} inputs that matches the corresponding Selector in the current UOW. If CallAfterFillIn callback is defined, it will be called after each row is consumed and the text is input. | |
| IAllowSelectorActionOrAnySelector | AppendFrom (IGPALGrid< string > inputGrid) |
| Append the data from the input grid to the end of the input Selectors defined in the UOW One token (one string from the current row) per per input. If .WithAllThatMatch is defined on the current UOW, then this token is entered into {num} inputs that matches the corresponding Selector in the current UOW. If CallAfterFillIn callback is defined, it will be called after each row is consumed and the text is input. | |
| IAllowSelectorActionOrAnySelector | AppendFrom (string textToUse) |
| Append the given text to the first input in the UOW. Should probably only be used with one selector at a time. If .WithAllThatMatch is defined on the current UOW, then this text is entered into {num} inputs that matches the Selector(s) in the current UOW. | |
| IAllowAllExceptParameters | Open ([Directory()] string applicationPath) |
| Launch the application specified in the path. Find the root automation element and place into applicationSettings.RootAutomationElement Used in conjunction with .WithParameters. | |
| void | Close () |
| Close/terminate the application. This terminates the fluent interface and nothing can be chained to this command. | |
| IAllowSelectorActionOrAnySelector | FillInFrom (GPALDatabase inputDatabase) |
| FillIn data from the database overwriting text in the input Selector(s) defined in the UOW One token (one column in the current row) per input/element found. If .WithAllThatMatch is defined on the current UOW, then the token is entered into {num} inputs that matches the corresponding Selector in the current UOW. If CallAfterFillIn callback is defined, it will be called after each row is consumed and the text is input. | |
| IAllowSelectorActionOrAnySelector | FillInFrom (GPALFile inputFile) |
| FillIn data from the file overwriting text in the input Selector(s) defined in the UOW One token (one string [between commas] from the current row) per input/element found. If .WithAllThatMatch is defined on the current UOW, then the token is entered into {num} inputs that matches the corresponding Selector in the current UOW. If CallAfterFillIn callback is defined, it will be called after each row is consumed and the text is input. | |
| IAllowSelectorActionOrAnySelector | FillInFrom (IGPALGrid< string > inputGrid) |
| FillIn data from the grid overwriting text in the input Selector(s) defined in the UOW One token (one string from the current row) per input/element found. If .WithAllThatMatch is defined on the current UOW, then this token is entered into {num} inputs that matches the corresponding Selector in the current UOW. If CallAfterFillIn callback is defined, it will be called after each row is consumed and the text is input. | |
| IAllowSelectorActionOrAnySelector | FillInFrom (string textToUse) |
| FillIn the text from the string overwriting text in the first input in the UOW. Should probably only be used with one selector at a time. If .WithAllThatMatch is defined on the current UOW, then this text is entered into {num} inputs that matches the Selector(s) in the current UOW. | |
| IAllowSelectorActionOrAnySelector | Focus (Selector selector=null) |
| Focus the current element found via the Selector. Only the first element per Selector found will be focused. IF using hardwre emulation (.WithHardware) for this selector, for text inputs, focus is a click in the control. Otherwise, hardware emulation hovers the mouse over the control. If .WithAllThatMatch is defined on the current UOW, then focus will interate over every {num} elements that matches the Selector(s) in the current UOW. | |
| IAllowSelectorActionOrAnySelector | Hover (Selector selector=null) |
| Hover the mouse over the current element found via the Selector. Only the first element per Selector found will be focused. Using UIAutomation, setFocus is first called on the item, then the mouse moved to hover over the element. IF using hardwre emulation (.WithHardware) for this selector, for text inputs, focus is a click in the control. Otherwise, hardware emulation hovers the mouse over the control. If .WithAllThatMatch is defined on the current UOW, then focus will interate over every {num} elements that matches the Selector(s) in the current UOW. | |
| IAllowSelectorActionOrAnySelector | InsertFrom (string textToUse) |
| Insert the text from the string at the beginning of the first input in the UOW. Should probably only be used with one selector at a time. Example: If three inputs are defined and three 'InsertFrom' are defined, then the text is assigned to the same ordinal input element found via the Selector(s) If .WithAllThatMatch is defined on the current UOW, then this text is entered into {num} inputs that matches the corresponding Selector(s) in the current UOW. | |
| IAllowSelectorActionOrAnySelector | InsertFrom (GPALDatabase inputDatabase) |
| Insert the text from the database at the beginning of the input Selector(s) defined in the UOW One token (one column in the current row) per input/element found. If .WithAllThatMatch is defined on the current UOW, then the token is entered into {num} inputs that matches the corresponding Selector in the current UOW. If CallAfterFillIn callback is defined, it will be called after each row is consumed and the text is input. | |
| IAllowSelectorActionOrAnySelector | InsertFrom (IGPALGrid< string > inputGrid) |
| Insert the data from the grid at the beginning of the text in the input Selector(s) defined in the UOW One token (one string from the current row) per input/element found. If .WithAllThatMatch is defined on the current UOW, then this token is entered into {num} inputs that matches the corresponding Selector in the current UOW. If CallAfterFillIn callback is defined, it will be called after each row is consumed and the text is input. | |
| IAllowSelectorActionOrAnySelector | InsertFrom (GPALFile inputFile) |
| Insert the data from the file at the beginning of the text in the input Selector(s) defined in the UOW One token (one string [between commas] from the current row) per per input/element found. If .WithAllThatMatch is defined on the current UOW, then the token is entered into {num} inputs that matches the corresponding Selector in the current UOW. If CallAfterFillIn callback is defined, it will be called after each row is consumed and the text is input. | |
| IAllowSelectorActionOrAnySelector | LeftClick (Selector selector=null) |
| Left click the element found for Selector(s) defined in the UOW One left click for the first element found for each selector. Should probably be used with only one Selector in the UOW. If .WithAllThatMatch is defined on the current UOW, then a left click is performed on {num} elements that matches the corresponding Selector in the current UOW. . | |
| IAllowSelectorActionOrAnySelector | LeftClick (Enums.ModifierKeys modifierKeys) |
| Left click the element found for Selector(s) defined in the UOW, optionally emulating pressing a modifier key at the same time. | |
| IAllowSelectorActionOrAnySelector | LeftDoubleClick (Selector selector=null) |
| Left double click the element found for Selector(s) defined in the UOW. | |
| IAllowSelectorActionOrAnySelector | MiddleClick (Selector selector=null) |
| Middle click the element found for Selector(s) defined in the UOW. | |
| IAllowSelectorActionOrAnySelector | MoveTo (Selector selector=null) |
| Move the mouse cursor to the element found for Selector(s) defined in the UOW. | |
| IAllowSelectorActionOrAnySelector | DragAndDrop (Selector selector=null) |
| Performs a drag from the source element to the target element, both found via Selector(s) defined in the UOW. | |
| IAllowSelectorActionOrAnySelector | DragAndDrop (ModifierKeys modifierKeys) |
| Performs a drag from the source element to the target element, both found via Selector(s) defined in the UOW, while holding the given modifier key. | |
| IAllowSelectorActionOrAnySelector | PressModifierKey (ModifierKeys modifierKeys) |
| Press and hold a modifier key (Alt, Control, Shift) using hardware emulation. | |
| IAllowSelectorActionOrAnySelector | ReleaseModifierKey (ModifierKeys modifierKeys) |
| Release a previously pressed modifier key (Alt, Control, Shift) using hardware emulation. | |
| IAllowSelectorActionOrAnySelector | SendKey (byte VKCode) |
| Type special characters like Enter, Page Up, Page Down, Tab, etc. Use GPAL.VK constants for ease of access to commmon keys. For all Virtual Keycodes, visit: https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes. | |
| IAllowSelectorActionOrAnySelector | SendString (string textToSend) |
| Send the string using hardware emulation. | |
| IAllowAllActionAndAnySelector | SwitchToTab (Selector selector=null) |
| Switch to any TabControl defined in the current UOW. This will hardware click the tab control if the SelectionItemPattern fails to allow a click If .WithAllThatMatch is defined on the current UOW, GPAL will attempt to switch to {num} tabs that matched the Selector(s) in the current UOW. | |
| IAllowAllActionAndAnySelector | SetRange (double rangeValue) |
| Set the value of a range-based control (e.g. a slider) found via Selector(s) defined in the UOW. | |
| IAllowSelectorActionOrAnySelector | RightClick (Selector selector=null) |
| Right click the element found for Selector(s) defined in the UOW One right click for the first element found for each selector. Should probably be used with only one Selector in the UOW. If .WithAllThatMatch is defined on the current UOW, then a right click is performed on {num} elements that matches the corresponding Selector in the current UOW. . | |
| IAllowAfterWaitForAndSizeControl | WaitFor (int timeoutInTicks) |
| Either wait the amount of time specified or wait UP TO the amount of time specified waiting for elements to be found for the Selector(s) in the current UOW. If an action has already been called, then this is interpretted as a sleep for the specified miliseconds. If only selectors have been defined in the current UOW, then this is a delay waiting for the selectors to be present before continuing with the workflow. Waiting for elements does not guarantee they will be present when the workflow continues. If they are not present, the CallIfNotFound handler will be invoked so you can deal with that. NOTE: WaitFor is not considered an action, it defines a time to wait for elements to be present before trying to perform actions. | |
| IAllowAfterWaitForAndSizeControl | WaitForWindow (string windowTitle) |
| Wait for a Windows window with title to appear on the desktop. Used in conjunction with .WithWaitForWindowTimeout to set the wait duration in seconds. Default is 10 seconds. | |
| IAllowAfterWaitForAndSizeControl | WaitForWindowRegex (string windowTitleRegex) |
| Wait for a Windows window with title that matches the regex pattern to appear on the desktop. Used in conjunction with .WithWaitForWindowTimeout to set the wait duration in seconds. Default is 10 seconds. | |
| IAllowSelectorActionOrAnySelector | ScrollHorizontalSmall (int iterations=1) |
| Scroll the element horizontally in a small increment. https://docs.microsoft.com/en-us/windows/win32/api/uiautomationcore/ne-uiautomationcore-scrollamount. | |
| IAllowSelectorActionOrAnySelector | ScrollHorizontalLarge (int iterations=1) |
| Scroll the element horizontally in a large increment. https://docs.microsoft.com/en-us/windows/win32/api/uiautomationcore/ne-uiautomationcore-scrollamount. | |
| IAllowSelectorActionOrAnySelector | ScrollHorizontalPercent (int percent) |
| Element's horizontal scroll position as a percentage of the total content area within the AutomationElement. . | |
| IAllowSelectorActionOrAnySelector | ScrollVerticalSmall (int iterations=1) |
| Scroll the element vertically in a small increment. https://docs.microsoft.com/en-us/windows/win32/api/uiautomationcore/ne-uiautomationcore-scrollamount. | |
| IAllowSelectorActionOrAnySelector | ScrollVerticalLarge (int iterations=1) |
| Scroll the element vertically in a large increment. https://docs.microsoft.com/en-us/windows/win32/api/uiautomationcore/ne-uiautomationcore-scrollamount. | |
| IAllowSelectorActionOrAnySelector | ScrollVerticalPercent (int percent) |
| Element's vertical scroll position as a percentage of the total content area within the AutomationElement. . | |
| void | RemoveCallIfHandlerEverywhere (Application.CallIfDelegate func) |
| Helper method for GPAL applications to remove a handler from all UOWs. Envisioned to be used in a persistent handler, but can be used anyway imagined. This is not fluent. | |
| IAllowApplicationSettingsOrOpen | WithName (string appName) |
| Sets the application's name, used when publishing events. | |
| IAllowPersistentCallBack | PersistentCallIfFound (CallIfDelegate persistentCallIfFound) |
| Add a persistent CallIfFound handler to be called if any defined persistent selectors find/match elements. Persistent selectors are always looked for before every action cross-cutting your workflow. Persistent handlers can remove themselves in the CallIfHandler by calling myApplication.RemoveCallIfHandlerEverywhere(handler) More than one callback may be defined and will cascade thru the list depending upon the callback return value. See: CallIfDelegate. | |
| IAllowPersistentCallBack | PersistentCallIfNotFound (CallIfDelegate persistentCallIfNotFound) |
| Add a persistent CallIfNotFound handler to be called if any defined persistent selectors DO NOT find/match elements. Persistent selectors are always looked for before every action cross-cutting your workflow. Persistent handlers can remove themselves in the CallIfHandler by calling myApplication.RemoveCallIfHandlerEverywhere(handler) More than one callback may be defined and will cascade thru the list depending upon the callback return value. See: CallIfDelegate. | |
| IAllowPersistence | WithPersistentSelector (Selector selector) |
| Add a persistent selector to the persistent UOW. Persistent selectors are always looked for whenever you perform an action on a UOW, like LeftClick, Hover, Focus, etc. Use in conjunction with the PersistentCallIf handlers to create workflows to deal with the persistent selector(s). Selectors may remove themselves from a UOW by using selector.Remove() Only one persistent Unit of Work exists. All selectors are evaluated in the order they are defined. Example: For applications, a persistent selector could be used with a timer in the callback, when elapsed time occurs, invoke an action on that Selector (like Save work). | |
| IAllowSelectorActionOrAnySelector | WithSelector (Selector selector) |
| Add a selector to the current UOW. Selectors make up a Unit of Work (UOW) to perform actions upon. A UOW is: All selectors defined between actions like Open, LeftClick, Hover, Focus, etc. Use in conjunction with the CallIf handlers to create workflows to deal with found/not found selector(s). Selectors may remove themselves from a UOW by using selector.Remove() . | |
| IAllowAfterAnySelectorExceptWithAll | WithAllThatMatch (int rowCount=int.MaxValue) |
| Indicates the Selectors refer to/match repeating, multiple elements on the page. Use after all your .WithSelector statements. Used two ways. For retrieving data: This is used to retrieve multiple rows of elements from the webpage, up to rowCount. For input tokens/strings: This will repeat the same input into multiple elements, up to rowCount of lines. For tokens, if columns repeat down the page, column 1 will be filled in with token 1, column 2 with token 2, etc. This will be repeated for each row. For extracting data from selectors using GetGrid/SaveTo[CSV/Excel/Tabbed] up to rowCount rows of elements matching the Selector will be retrieved for saving. Again, rowCount column 1 going down a page will be retrieved, column 2, etc. that is then pivoted to an output of rows/columns. | |
| IAllowWithHeaderOrFileActions | GetGrid (ref IGPALGrid< string > returnGrid) |
| Retrieve the current selectors' data (or a table/grid control's data) into a GPALGrid. The grid is passed by ref: pass an existing grid and GetGrid adds its rows into it (reuse one grid to accumulate across calls, it never replaces your reference); pass null to get a fresh grid back. GPAL also keeps the grid internally for any following SaveTo*/AppendTo* call. | |
| IAllowWithHeaderOrFileActions | WithHeader (string header) |
| Column header for exported data. Overrides selector names / table headers, in order. | |
| IAllowWithHeaderOrFileActions | WithGridToSave (IGPALGrid< string > gridToSave) |
| Supply a GPALGrid (perhaps built elsewhere) to be saved by a following SaveTo*. | |
| IAllowWithPagesAndGridActions | WithNextPageButton (Selector selector) |
| The control to click to load the next page when paging through results. | |
| IAllowGetGridAndFillInFrom | WithPages (int numberOfPages) |
| Number of result pages to retrieve. Use with WithNextPageButton. | |
| IAllowAllActionAndAnySelector | SaveTo (GPALFile file) |
| Save the retrieved grid. The output format and delimiter are determined by the GPALFile (its extension, e.g. .csv/.tsv/.txt/.xlsx/.json, or its explicit file settings). | |
| IAllowAllActionAndAnySelector | AppendTo (GPALFile file) |
| Append the retrieved grid. The output format and delimiter are determined by the GPALFile (its extension or explicit file settings). Headers are not repeated on append. | |
| IAllowAfterWaitForAndSizeControl | WithWaitForWindowTimeout (int waitTimeInSeconds) |
| Define the time in seconds to WaitForWindow/Regex. | |
| IAllowApplicationSettingsOrOpen | WithParameter (string parameter) |
| Define the parameters to use in the Open command. | |
| IAllowApplicationSettingsOrOpen | WithUseHardware (bool trueFalse) |
| Force all workflow element interactions to use hardware emulation (UIAutomation is default). | |
| IAllowAfterAnySelector | CallIfFound (Application.CallIfDelegate callIfFoundDelegate) |
| Add a Unit of Work level CallIfFound handler to be called if any defined selectors find/match elements. This method will be called for every found selector in the current UOW. CallIf handlers can remove themselves by calling myApplication.RemoveCallIfHandlerEverywhere(handler) Selectors may remove themselves from a UOW by using selector.Remove() More than one callback may be defined and will cascade thru the list depending upon the callback return value. See: CallIfDelegate. | |
| IAllowAfterAnySelector | CallIfNotFound (Application.CallIfDelegate callIfNotFoundDelegate) |
| Add a Unit of Work level CallIfNotFound handler to be called if any defined selectors DO NOT find/match elements. This method will be called for every NOT FOUND selector in the current UOW. CallIf handlers can remove themselve by calling myApplication.RemoveCallIfHandlerEverywhere(handler) Selectors may remove themselves from a UOW by using selector.Remove() More than one callback may be defined and will cascade thru the list depending upon the callback return value. See: CallIfDelegate. | |
| IAllowAfterAnySelector | CallAfterFillIn (CallAfterFillInDelegate callAfterFillIn) |
| Add a handler to call after a row of tokens is consumed and after all inputs are filled in with data. Only one CallAfterFillIn handler is possible, no chaining. Use FillInFrom[Database|File|GPALGrid] to loop thru data in your main workflow and then perform next workflow steps in the CallAfterFillIn handler. | |
| Public Member Functions inherited from GenerallyPositive.Application.IApplication | |
| IAllowSelectorActionOrAnySelector | AppendFrom (IGPALFile inputFile) |
| IAllowAfterAnySelector | CallAfterFillIn (Application.CallAfterFillInDelegate callAfterFillIn) |
| IAllowAllActionAndAnySelector | CloseTab (string URL) |
| IAllowSelectorActionOrAnySelector | FillInFrom (IGPALFile inputFile) |
| IAllowSelectorActionOrAnySelector | Focus () |
| IAllowSelectorActionOrAnySelector | Hover () |
| IAllowSelectorActionOrAnySelector | InsertFromDatabase (GPALDatabase inputDatabase) |
| IAllowSelectorActionOrAnySelector | InsertFromFile (IGPALFile inputFile) |
| IAllowSelectorActionOrAnySelector | InsertFromGrid (IGPALGrid< string > inputGrid) |
| IAllowSelectorActionOrAnySelector | LeftClickAndDownload (string filename) |
| IAllowSelectorActionOrAnySelector | LeftDoubleClick () |
| IAllowSelectorActionOrAnySelector | MoveTo () |
| IAllowAllActionAndAnySelector | NextTab () |
| IAllowPersistentCallBack | PersistentCallIfFound (Application.CallIfDelegate persistentCallIfFound) |
| IAllowPersistentCallBack | PersistentCallIfNotFound (Application.CallIfDelegate persistentCallIfNotFound) |
| IAllowAllActionAndAnySelector | PreviousTab () |
| IAllowSelectorActionOrAnySelector | RightClick () |
| Public Member Functions inherited from GenerallyPositive.Application.IAllowClicks | |
| IAllowSelectorActionOrAnySelector | LeftClick (ModifierKeys modifierKeys) |
Properties | |
| IAllowAllApplicationAndAllSelector | Maximize [get] |
| Maximize the application to full-screen. | |
| IAllowAllApplicationAndAllSelector | Minimize [get] |
| Minimize the application to the taskbar. | |
| IAllowAllApplicationAndAllSelector | Restore [get] |
| Restore the application to 'original' size, unminimize. | |
| IAllowWithPagesAndGridActions | WithInfiniteScroll [get] |
| Scroll to load more rows between pages. Not supported for desktop apps (single page). | |
| Process | Process [get, set] |
| The current Windows process for the program run via Open. Only one program can be Opened/controlled per application. This get is intended for debugging only. | |
| object | ManagedRootAutomationElement [get, set] |
| The root UI Automation element (AutomationElement) for the managed application's main window. | |
| AutomationElement | RootAutomationElement [get, set] |
| The starting AutomationElement for the application. All xpath searches start from this AutomationElement. | |
| string | Name [get, set] |
| A name you provide to be used when publishing events. Use .WithName to provide your own friendly name. If not supplied GPAL will assign the name application1, application2, etc This get is intended for debugging only. | |
| string | ApplicationPath [get, set] |
| The path of the program you Opened. This get is intended for debugging only. | |
Application object that contains the fluent methods to create your Application workflow.
Instantiated using GPAL.Application.
Definition at line 48 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.AppendFrom | ( | GPALDatabase | inputDatabase | ) |
Append the data from the database to the end of the input Selectors defined in the UOW
One token (one column in the current row) per per input.
If .WithAllThatMatch is defined on the current UOW, then the token is entered into {num} inputs that matches the corresponding Selector in the current UOW.
If CallAfterFillIn callback is defined, it will be called after each row is consumed and the text is input.
| inputDatabase | The GPAL Database definitoin |
Implements GenerallyPositive.Application.IApplication.
Definition at line 314 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.AppendFrom | ( | GPALFile | inputFile | ) |
Append the data from the input file to the end of the input Selectors defined in the UOW
One token (one string [between commas] from the current row) per per input.
If .WithAllThatMatch is defined on the current UOW, then the token is entered into {num} inputs that matches the corresponding Selector in the current UOW.
If CallAfterFillIn callback is defined, it will be called after each row is consumed and the text is input.
| inputFile | The GPAL File definition |
Implements GenerallyPositive.Application.IAllowFillInFrom.
Definition at line 329 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.AppendFrom | ( | IGPALGrid< string > | inputGrid | ) |
Append the data from the input grid to the end of the input Selectors defined in the UOW
One token (one string from the current row) per per input.
If .WithAllThatMatch is defined on the current UOW, then this token is entered into {num} inputs that matches the corresponding Selector in the current UOW.
If CallAfterFillIn callback is defined, it will be called after each row is consumed and the text is input.
| inputGrid | The input grid of tokens |
Implements GenerallyPositive.Application.IApplication.
Definition at line 346 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.AppendFrom | ( | string | textToUse | ) |
Append the given text to the first input in the UOW. Should probably only be used with one selector at a time.
If .WithAllThatMatch is defined on the current UOW, then this text is entered into {num} inputs that matches the Selector(s) in the current UOW.
| textToUse | The input text to use |
Implements GenerallyPositive.Application.IApplication.
Definition at line 359 of file Application.cs.
| IAllowAllActionAndAnySelector GenerallyPositive.Application.Application.AppendTo | ( | GPALFile | file | ) |
Append the retrieved grid. The output format and delimiter are determined by the GPALFile (its extension or explicit file settings). Headers are not repeated on append.
Implements GenerallyPositive.Application.IAllowFileActions.
Definition at line 1368 of file Application.cs.
| IAllowAfterAnySelector GenerallyPositive.Application.Application.CallAfterFillIn | ( | CallAfterFillInDelegate | callAfterFillIn | ) |
Add a handler to call after a row of tokens is consumed and after all inputs are filled in with data.
Only one CallAfterFillIn handler is possible, no chaining.
Use FillInFrom[Database|File|GPALGrid] to loop thru data in your main workflow and then perform next workflow steps in the CallAfterFillIn handler.
| callAfterFillIn | Your CallAfterFillIn method |
Definition at line 1443 of file Application.cs.
| delegate CallIfStatus GenerallyPositive.Application.Application.CallAfterFillInDelegate | ( | Application | application, |
| IGPALGrid< string > | tokens, | ||
| int | tokenIdx ) |
Delegate callback for the CallAfterFillIn EventHandler which will be invoked after each row of tokens is consumed.
Invoked whenever FillInFrom/FilllInFromDatabase/FillInFrom are used.
| application | The GPAL Application object being filled in |
| tokens | The current GPALGrid of tokens |
| tokenIdx | The current token row index |
| delegate CallIfStatus GenerallyPositive.Application.Application.CallIfDelegate | ( | Application | application, |
| List< IGPALAutomationElement > | foundElements, | ||
| List< IGPALAutomationElement > | matchedElements, | ||
| Selector | selector, | ||
| bool | matchedAll ) |
Delegate callback for the CallIfFound/CallIfNotFound EventHandlers which will be invoked when a selector is found/not found
CallIf handlers may be defined at two levels: At each selector or for a Unit of Work (UOW) [will be invoked for each Selector in the UOW]
A UOW is defined as all Selectors between actions (first action is Open)
More than one callback handler can be defined and subsequent handlers will only be invoked based upon return code values.
| application | The current application running |
| foundElements | All found elements |
| matchedElements | All matched elements. If a 'Match' criteria is set on a Selector, otherwise all found |
| selector | The Selector used |
| matchedAll | true - all elements matched in foundElements false - matchedElements out of foundElements |
| IAllowAfterAnySelector GenerallyPositive.Application.Application.CallIfFound | ( | Application.CallIfDelegate | callIfFoundDelegate | ) |
Add a Unit of Work level CallIfFound handler to be called if any defined selectors find/match elements.
This method will be called for every found selector in the current UOW.
CallIf handlers can remove themselves by calling myApplication.RemoveCallIfHandlerEverywhere(handler)
Selectors may remove themselves from a UOW by using selector.Remove()
More than one callback may be defined and will cascade thru the list depending upon the callback return value.
See: CallIfDelegate.
| callIfFoundDelegate | Callback delegate |
Implements GenerallyPositive.Application.IApplication.
Definition at line 1416 of file Application.cs.
| IAllowAfterAnySelector GenerallyPositive.Application.Application.CallIfNotFound | ( | Application.CallIfDelegate | callIfNotFoundDelegate | ) |
Add a Unit of Work level CallIfNotFound handler to be called if any defined selectors DO NOT find/match elements.
This method will be called for every NOT FOUND selector in the current UOW.
CallIf handlers can remove themselve by calling myApplication.RemoveCallIfHandlerEverywhere(handler)
Selectors may remove themselves from a UOW by using selector.Remove()
More than one callback may be defined and will cascade thru the list depending upon the callback return value.
See: CallIfDelegate.
| callIfNotFoundDelegate | Callback delegate |
Implements GenerallyPositive.Application.IApplication.
Definition at line 1431 of file Application.cs.
| void GenerallyPositive.Application.Application.Close | ( | ) |
Close/terminate the application.
This terminates the fluent interface and nothing can be chained to this command.
Implements GenerallyPositive.Application.IApplication.
Definition at line 502 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.DragAndDrop | ( | ModifierKeys | modifierKeys | ) |
Performs a drag from the source element to the target element, both found via Selector(s) defined in the UOW, while holding the given modifier key.
| modifierKeys | Modifier key to hold during the drag and drop |
Implements GenerallyPositive.Application.IAllowClicks.
Definition at line 727 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.DragAndDrop | ( | Selector | selector = null | ) |
Performs a drag from the source element to the target element, both found via Selector(s) defined in the UOW.
| selector | Optional selector to use; if provided, becomes the active selector for this UOW |
Implements GenerallyPositive.Application.IAllowClicks.
Definition at line 714 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.FillInFrom | ( | GPALDatabase | inputDatabase | ) |
FillIn data from the database overwriting text in the input Selector(s) defined in the UOW
One token (one column in the current row) per input/element found.
If .WithAllThatMatch is defined on the current UOW, then the token is entered into {num} inputs that matches the corresponding Selector in the current UOW.
If CallAfterFillIn callback is defined, it will be called after each row is consumed and the text is input.
| inputDatabase | The GPAL Database definitoin |
Implements GenerallyPositive.Application.IApplication.
Definition at line 515 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.FillInFrom | ( | GPALFile | inputFile | ) |
FillIn data from the file overwriting text in the input Selector(s) defined in the UOW
One token (one string [between commas] from the current row) per input/element found.
If .WithAllThatMatch is defined on the current UOW, then the token is entered into {num} inputs that matches the corresponding Selector in the current UOW.
If CallAfterFillIn callback is defined, it will be called after each row is consumed and the text is input.
| inputFile | The GPAL File definition |
Implements GenerallyPositive.Application.IAllowFillInFrom.
Definition at line 532 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.FillInFrom | ( | IGPALGrid< string > | inputGrid | ) |
FillIn data from the grid overwriting text in the input Selector(s) defined in the UOW
One token (one string from the current row) per input/element found.
If .WithAllThatMatch is defined on the current UOW, then this token is entered into {num} inputs that matches the corresponding Selector in the current UOW.
If CallAfterFillIn callback is defined, it will be called after each row is consumed and the text is input.
| inputGrid | The input grid of tokens |
Implements GenerallyPositive.Application.IApplication.
Definition at line 547 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.FillInFrom | ( | string | textToUse | ) |
FillIn the text from the string overwriting text in the first input in the UOW. Should probably only be used with one selector at a time.
If .WithAllThatMatch is defined on the current UOW, then this text is entered into {num} inputs that matches the Selector(s) in the current UOW.
| textToUse | The input text to use |
Implements GenerallyPositive.Application.IApplication.
Definition at line 559 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.Focus | ( | Selector | selector = null | ) |
Focus the current element found via the Selector. Only the first element per Selector found will be focused.
IF using hardwre emulation (.WithHardware) for this selector, for text inputs, focus is a click in the control. Otherwise, hardware emulation hovers the mouse over the control.
If .WithAllThatMatch is defined on the current UOW, then focus will interate over every {num} elements that matches the Selector(s) in the current UOW.
Implements GenerallyPositive.Application.IAllowFocus.
Definition at line 571 of file Application.cs.
| IAllowWithHeaderOrFileActions GenerallyPositive.Application.Application.GetGrid | ( | ref IGPALGrid< string > | returnGrid | ) |
Retrieve the current selectors' data (or a table/grid control's data) into a GPALGrid. The grid is passed by ref: pass an existing grid and GetGrid adds its rows into it (reuse one grid to accumulate across calls, it never replaces your reference); pass null to get a fresh grid back.
GPAL also keeps the grid internally for any following SaveTo*/AppendTo* call.
Implements GenerallyPositive.Application.IAllowGetGrid.
Definition at line 1119 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.Hover | ( | Selector | selector = null | ) |
Hover the mouse over the current element found via the Selector. Only the first element per Selector found will be focused.
Using UIAutomation, setFocus is first called on the item, then the mouse moved to hover over the element.
IF using hardwre emulation (.WithHardware) for this selector, for text inputs, focus is a click in the control. Otherwise, hardware emulation hovers the mouse over the control.
If .WithAllThatMatch is defined on the current UOW, then focus will interate over every {num} elements that matches the Selector(s) in the current UOW.
Implements GenerallyPositive.Application.IAllowHover.
Definition at line 585 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.InsertFrom | ( | GPALDatabase | inputDatabase | ) |
Insert the text from the database at the beginning of the input Selector(s) defined in the UOW
One token (one column in the current row) per input/element found.
If .WithAllThatMatch is defined on the current UOW, then the token is entered into {num} inputs that matches the corresponding Selector in the current UOW.
If CallAfterFillIn callback is defined, it will be called after each row is consumed and the text is input.
| inputDatabase | The GPAL Database definitoin |
Implements GenerallyPositive.Application.IAllowFillInFrom.
Definition at line 613 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.InsertFrom | ( | GPALFile | inputFile | ) |
Insert the data from the file at the beginning of the text in the input Selector(s) defined in the UOW
One token (one string [between commas] from the current row) per per input/element found.
If .WithAllThatMatch is defined on the current UOW, then the token is entered into {num} inputs that matches the corresponding Selector in the current UOW.
If CallAfterFillIn callback is defined, it will be called after each row is consumed and the text is input.
| inputFile | The GPAL File definition |
Implements GenerallyPositive.Application.IAllowFillInFrom.
Definition at line 642 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.InsertFrom | ( | IGPALGrid< string > | inputGrid | ) |
Insert the data from the grid at the beginning of the text in the input Selector(s) defined in the UOW
One token (one string from the current row) per input/element found.
If .WithAllThatMatch is defined on the current UOW, then this token is entered into {num} inputs that matches the corresponding Selector in the current UOW.
If CallAfterFillIn callback is defined, it will be called after each row is consumed and the text is input.
| inputGrid | The input grid of tokens |
Implements GenerallyPositive.Application.IAllowFillInFrom.
Definition at line 628 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.InsertFrom | ( | string | textToUse | ) |
Insert the text from the string at the beginning of the first input in the UOW. Should probably only be used with one selector at a time.
Example: If three inputs are defined and three 'InsertFrom' are defined, then the text is assigned to the same ordinal input element found via the Selector(s) If .WithAllThatMatch is defined on the current UOW, then this text is entered into {num} inputs that matches the corresponding Selector(s) in the current UOW.
| textToUse | The input text to use |
Implements GenerallyPositive.Application.IApplication.
Definition at line 599 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.LeftClick | ( | Enums.ModifierKeys | modifierKeys | ) |
Left click the element found for Selector(s) defined in the UOW, optionally emulating pressing a modifier key at the same time.
| modifierKeys | Modifier key to hold during the click |
Implements GenerallyPositive.Application.IApplication.
Definition at line 667 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.LeftClick | ( | Selector | selector = null | ) |
Left click the element found for Selector(s) defined in the UOW
One left click for the first element found for each selector. Should probably be used with only one Selector in the UOW.
If .WithAllThatMatch is defined on the current UOW, then a left click is performed on {num} elements that matches the corresponding Selector in the current UOW.
.
Implements GenerallyPositive.Application.IAllowClicks.
Definition at line 655 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.LeftDoubleClick | ( | Selector | selector = null | ) |
Left double click the element found for Selector(s) defined in the UOW.
| selector | Optional selector to use; if provided, becomes the active selector for this UOW |
Implements GenerallyPositive.Application.IAllowClicks.
Definition at line 678 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.MiddleClick | ( | Selector | selector = null | ) |
Middle click the element found for Selector(s) defined in the UOW.
| selector | Optional selector to use; if provided, becomes the active selector for this UOW |
Implements GenerallyPositive.Application.IAllowClicks.
Definition at line 690 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.MoveTo | ( | Selector | selector = null | ) |
Move the mouse cursor to the element found for Selector(s) defined in the UOW.
| selector | Optional selector to use; if provided, becomes the active selector for this UOW |
Implements GenerallyPositive.Application.IAllowMoveTo.
Definition at line 702 of file Application.cs.
| IAllowAllApplicationAndAllSelector GenerallyPositive.Application.Application.MoveWindow | ( | int | x, |
| int | y ) |
Move the window last matched by WaitForWindow to the specified screen coordinates.
Implements GenerallyPositive.Application.IAllowSizeControl.
Definition at line 300 of file Application.cs.
| IAllowAllExceptParameters GenerallyPositive.Application.Application.Open | ( | [Directory()] string | applicationPath | ) |
Launch the application specified in the path.
Find the root automation element and place into applicationSettings.RootAutomationElement
Used in conjunction with .WithParameters.
| applicationPath | Path to application to open/run/launch |
Implements GenerallyPositive.Application.IApplication.
Definition at line 372 of file Application.cs.
| IAllowPersistentCallBack GenerallyPositive.Application.Application.PersistentCallIfFound | ( | CallIfDelegate | persistentCallIfFound | ) |
Add a persistent CallIfFound handler to be called if any defined persistent selectors find/match elements.
Persistent selectors are always looked for before every action cross-cutting your workflow.
Persistent handlers can remove themselves in the CallIfHandler by calling myApplication.RemoveCallIfHandlerEverywhere(handler)
More than one callback may be defined and will cascade thru the list depending upon the callback return value.
See: CallIfDelegate.
| persistentCallIfFound |
Definition at line 1014 of file Application.cs.
| IAllowPersistentCallBack GenerallyPositive.Application.Application.PersistentCallIfNotFound | ( | CallIfDelegate | persistentCallIfNotFound | ) |
Add a persistent CallIfNotFound handler to be called if any defined persistent selectors DO NOT find/match elements.
Persistent selectors are always looked for before every action cross-cutting your workflow. Persistent handlers can remove themselves in the CallIfHandler by calling myApplication.RemoveCallIfHandlerEverywhere(handler)
More than one callback may be defined and will cascade thru the list depending upon the callback return value.
See: CallIfDelegate.
| persistentCallIfNotFound |
Definition at line 1029 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.PressModifierKey | ( | ModifierKeys | modifierKeys | ) |
Press and hold a modifier key (Alt, Control, Shift) using hardware emulation.
| modifierKeys | Alt, Control, Shift |
Implements GenerallyPositive.Application.IAllowKeyboardActions.
Definition at line 739 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.ReleaseModifierKey | ( | ModifierKeys | modifierKeys | ) |
Release a previously pressed modifier key (Alt, Control, Shift) using hardware emulation.
| modifierKeys | Alt, Control, Shift |
Implements GenerallyPositive.Application.IAllowKeyboardActions.
Definition at line 750 of file Application.cs.
| void GenerallyPositive.Application.Application.RemoveCallIfHandlerEverywhere | ( | Application.CallIfDelegate | func | ) |
Helper method for GPAL applications to remove a handler from all UOWs. Envisioned to be used in a persistent handler, but can be used anyway imagined. This is not fluent.
| func | The CallIf handler to remove |
Implements GenerallyPositive.Application.IApplication.
Definition at line 966 of file Application.cs.
| IAllowAllApplicationAndAllSelector GenerallyPositive.Application.Application.ResizeWindow | ( | int | width, |
| int | height ) |
Resize the window last matched by WaitForWindow to the specified pixel dimensions.
Implements GenerallyPositive.Application.IAllowSizeControl.
Definition at line 291 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.RightClick | ( | Selector | selector = null | ) |
Right click the element found for Selector(s) defined in the UOW
One right click for the first element found for each selector. Should probably be used with only one Selector in the UOW.
If .WithAllThatMatch is defined on the current UOW, then a right click is performed on {num} elements that matches the corresponding Selector in the current UOW.
.
Implements GenerallyPositive.Application.IAllowClicks.
Definition at line 820 of file Application.cs.
| IAllowAllActionAndAnySelector GenerallyPositive.Application.Application.SaveTo | ( | GPALFile | file | ) |
Save the retrieved grid. The output format and delimiter are determined by the GPALFile (its extension, e.g. .csv/.tsv/.txt/.xlsx/.json, or its explicit file settings).
Implements GenerallyPositive.Application.IAllowFileActions.
Definition at line 1351 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.ScrollHorizontalLarge | ( | int | iterations = 1 | ) |
Scroll the element horizontally in a large increment.
https://docs.microsoft.com/en-us/windows/win32/api/uiautomationcore/ne-uiautomationcore-scrollamount.
| iterations | Negative iterations scroll left. Positive scroll right. |
Implements GenerallyPositive.Application.IAllowScrolling.
Definition at line 895 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.ScrollHorizontalPercent | ( | int | percent | ) |
Element's horizontal scroll position as a percentage of the total content area within the AutomationElement.
.
| percent | Percentage of the total content area [0-100] |
Implements GenerallyPositive.Application.IAllowScrolling.
Definition at line 909 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.ScrollHorizontalSmall | ( | int | iterations = 1 | ) |
Scroll the element horizontally in a small increment.
https://docs.microsoft.com/en-us/windows/win32/api/uiautomationcore/ne-uiautomationcore-scrollamount.
| iterations | Negative iterations scroll left. Positive scroll right. |
Implements GenerallyPositive.Application.IAllowScrolling.
Definition at line 879 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.ScrollVerticalLarge | ( | int | iterations = 1 | ) |
Scroll the element vertically in a large increment.
https://docs.microsoft.com/en-us/windows/win32/api/uiautomationcore/ne-uiautomationcore-scrollamount.
| iterations | Negative iterations scroll up. Positive scroll down. |
Implements GenerallyPositive.Application.IAllowScrolling.
Definition at line 941 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.ScrollVerticalPercent | ( | int | percent | ) |
Element's vertical scroll position as a percentage of the total content area within the AutomationElement.
.
| percent | Percentage of the total content area [0-100] |
Implements GenerallyPositive.Application.IAllowScrolling.
Definition at line 955 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.ScrollVerticalSmall | ( | int | iterations = 1 | ) |
Scroll the element vertically in a small increment.
https://docs.microsoft.com/en-us/windows/win32/api/uiautomationcore/ne-uiautomationcore-scrollamount.
| iterations | Negative iterations scroll up. Positive scroll down. |
Implements GenerallyPositive.Application.IAllowScrolling.
Definition at line 925 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.SendKey | ( | byte | VKCode | ) |
Type special characters like Enter, Page Up, Page Down, Tab, etc.
Use GPAL.VK constants for ease of access to commmon keys.
For all Virtual Keycodes, visit:
https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes.
| VKCode | Virtual Keycode |
Implements GenerallyPositive.Application.IAllowKeyboardActions.
Definition at line 775 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.SendString | ( | string | textToSend | ) |
Send the string using hardware emulation.
| textToSend | The text to send |
Implements GenerallyPositive.Application.IAllowKeyboardActions.
Definition at line 786 of file Application.cs.
| IAllowAllActionAndAnySelector GenerallyPositive.Application.Application.SetRange | ( | double | rangeValue | ) |
Set the value of a range-based control (e.g. a slider) found via Selector(s) defined in the UOW.
| rangeValue | The value to set the range control to |
Implements GenerallyPositive.Application.IAllowSetRange.
Definition at line 808 of file Application.cs.
| IAllowAllActionAndAnySelector GenerallyPositive.Application.Application.SwitchToTab | ( | Selector | selector = null | ) |
Switch to any TabControl defined in the current UOW. This will hardware click the tab control if the SelectionItemPattern fails to allow a click If .WithAllThatMatch is defined on the current UOW, GPAL will attempt to switch to {num} tabs that matched the Selector(s) in the current UOW.
Implements GenerallyPositive.Application.IAllowTabActions.
Definition at line 796 of file Application.cs.
| Application GenerallyPositive.Application.Application.ToGPALObject | ( | ) |
Return a GPAL.Application object so that GPAL.Application does not have to be cast.
Implements GenerallyPositive.Application.IAllowToGPALObject< TResult >.
Definition at line 140 of file Application.cs.
| IAllowAfterWaitForAndSizeControl GenerallyPositive.Application.Application.WaitFor | ( | int | timeoutInTicks | ) |
Either wait the amount of time specified or wait UP TO the amount of time specified waiting for elements to be found for the Selector(s) in the current UOW.
If an action has already been called, then this is interpretted as a sleep for the specified miliseconds.
If only selectors have been defined in the current UOW, then this is a delay waiting for the selectors to be present before continuing with the workflow.
Waiting for elements does not guarantee they will be present when the workflow continues. If they are not present, the CallIfNotFound handler will be invoked so you can deal with that.
NOTE: WaitFor is not considered an action, it defines a time to wait for elements to be present before trying to perform actions.
| timeoutInTicks |
Implements GenerallyPositive.Application.IApplication.
Definition at line 836 of file Application.cs.
| IAllowAfterWaitForAndSizeControl GenerallyPositive.Application.Application.WaitForWindow | ( | string | windowTitle | ) |
Wait for a Windows window with title to appear on the desktop.
Used in conjunction with .WithWaitForWindowTimeout to set the wait duration in seconds.
Default is 10 seconds.
| windowTitle |
Implements GenerallyPositive.Application.IApplication.
Definition at line 854 of file Application.cs.
| IAllowAfterWaitForAndSizeControl GenerallyPositive.Application.Application.WaitForWindowRegex | ( | string | windowTitleRegex | ) |
Wait for a Windows window with title that matches the regex pattern to appear on the desktop.
Used in conjunction with .WithWaitForWindowTimeout to set the wait duration in seconds.
Default is 10 seconds.
| windowTitle |
Implements GenerallyPositive.Application.IApplication.
Definition at line 867 of file Application.cs.
| IAllowAfterAnySelectorExceptWithAll GenerallyPositive.Application.Application.WithAllThatMatch | ( | int | rowCount = int::MaxValue | ) |
Indicates the Selectors refer to/match repeating, multiple elements on the page.
Use after all your .WithSelector statements. Used two ways.
For retrieving data: This is used to retrieve multiple rows of elements from the webpage, up to rowCount.
For input tokens/strings: This will repeat the same input into multiple elements, up to rowCount of lines.
For tokens, if columns repeat down the page, column 1 will be filled in with token 1, column 2 with token 2, etc.
This will be repeated for each row.
For extracting data from selectors using GetGrid/SaveTo[CSV/Excel/Tabbed] up to rowCount rows of elements matching the Selector will be retrieved for saving.
Again, rowCount column 1 going down a page will be retrieved, column 2, etc. that is then pivoted to an output of rows/columns.
| rowCount | The number of rows of matching elements to work with. int.MaxValue [default] work with all rows. |
Implements GenerallyPositive.Application.IApplication.
Definition at line 1098 of file Application.cs.
| IAllowWithHeaderOrFileActions GenerallyPositive.Application.Application.WithGridToSave | ( | IGPALGrid< string > | gridToSave | ) |
Supply a GPALGrid (perhaps built elsewhere) to be saved by a following SaveTo*.
Implements GenerallyPositive.Application.IAllowWithGridToSave.
Definition at line 1289 of file Application.cs.
| IAllowWithHeaderOrFileActions GenerallyPositive.Application.Application.WithHeader | ( | string | header | ) |
Column header for exported data. Overrides selector names / table headers, in order.
Implements GenerallyPositive.Application.IAllowWithHeader.
Definition at line 1277 of file Application.cs.
| IAllowApplicationSettingsOrOpen GenerallyPositive.Application.Application.WithName | ( | string | appName | ) |
Sets the application's name, used when publishing events.
| appName | Name to associate with this Application |
Implements GenerallyPositive.Application.IAllowApplicationSettings.
Definition at line 1000 of file Application.cs.
| IAllowWithPagesAndGridActions GenerallyPositive.Application.Application.WithNextPageButton | ( | Selector | selector | ) |
The control to click to load the next page when paging through results.
Implements GenerallyPositive.Application.IAllowWithNextPageButton.
Definition at line 1296 of file Application.cs.
| IAllowGetGridAndFillInFrom GenerallyPositive.Application.Application.WithPages | ( | int | numberOfPages | ) |
Number of result pages to retrieve. Use with WithNextPageButton.
Implements GenerallyPositive.Application.IAllowWithPages.
Definition at line 1313 of file Application.cs.
| IAllowApplicationSettingsOrOpen GenerallyPositive.Application.Application.WithParameter | ( | string | parameter | ) |
Define the parameters to use in the Open command.
| parameters |
Implements GenerallyPositive.Application.IAllowApplicationSettings.
Definition at line 1391 of file Application.cs.
| IAllowPersistence GenerallyPositive.Application.Application.WithPersistentSelector | ( | Selector | selector | ) |
Add a persistent selector to the persistent UOW. Persistent selectors are always looked for whenever you perform an action on a UOW, like LeftClick, Hover, Focus, etc.
Use in conjunction with the PersistentCallIf handlers to create workflows to deal with the persistent selector(s).
Selectors may remove themselves from a UOW by using selector.Remove()
Only one persistent Unit of Work exists. All selectors are evaluated in the order they are defined.
Example: For applications, a persistent selector could be used with a timer in the callback, when elapsed time occurs, invoke an action on that Selector (like Save work).
Implements GenerallyPositive.Application.IApplication.
Definition at line 1044 of file Application.cs.
| IAllowSelectorActionOrAnySelector GenerallyPositive.Application.Application.WithSelector | ( | Selector | selector | ) |
Add a selector to the current UOW. Selectors make up a Unit of Work (UOW) to perform actions upon.
A UOW is: All selectors defined between actions like Open, LeftClick, Hover, Focus, etc.
Use in conjunction with the CallIf handlers to create workflows to deal with found/not found selector(s).
Selectors may remove themselves from a UOW by using selector.Remove()
.
Implements GenerallyPositive.Application.IApplication.
Definition at line 1067 of file Application.cs.
| IAllowApplicationSettingsOrOpen GenerallyPositive.Application.Application.WithUseHardware | ( | bool | trueFalse | ) |
Force all workflow element interactions to use hardware emulation (UIAutomation is default).
| trueFalse |
Implements GenerallyPositive.Application.IAllowApplicationSettings.
Definition at line 1401 of file Application.cs.
| IAllowAfterWaitForAndSizeControl GenerallyPositive.Application.Application.WithWaitForWindowTimeout | ( | int | waitTimeInSeconds | ) |
Define the time in seconds to WaitForWindow/Regex.
| waitTimeInSeconds |
Implements GenerallyPositive.Application.IApplication.
Definition at line 1381 of file Application.cs.
|
getset |
The path of the program you Opened.
This get is intended for debugging only.
Implements GenerallyPositive.Application.IApplication.
Definition at line 1519 of file Application.cs.
|
getset |
The root UI Automation element (AutomationElement) for the managed application's main window.
Implements GenerallyPositive.Application.IApplication.
Definition at line 1469 of file Application.cs.
|
get |
Maximize the application to full-screen.
Implements GenerallyPositive.Application.IApplication.
Definition at line 257 of file Application.cs.
|
get |
Minimize the application to the taskbar.
Implements GenerallyPositive.Application.IApplication.
Definition at line 269 of file Application.cs.
|
getset |
A name you provide to be used when publishing events.
Use .WithName to provide your own friendly name. If not supplied GPAL will assign the name application1, application2, etc
This get is intended for debugging only.
Implements GenerallyPositive.Application.IApplication.
Definition at line 1502 of file Application.cs.
|
getset |
The current Windows process for the program run via Open.
Only one program can be Opened/controlled per application.
This get is intended for debugging only.
Implements GenerallyPositive.Application.IApplication.
Definition at line 1455 of file Application.cs.
|
get |
Restore the application to 'original' size, unminimize.
Implements GenerallyPositive.Application.IApplication.
Definition at line 280 of file Application.cs.
|
getset |
The starting AutomationElement for the application. All xpath searches start from this AutomationElement.
Implements GenerallyPositive.Application.IApplication.
Definition at line 1484 of file Application.cs.
|
get |
Scroll to load more rows between pages. Not supported for desktop apps (single page).
Implements GenerallyPositive.Application.IAllowWithInfiniteScroll.
Definition at line 1303 of file Application.cs.