![]() |
GPAL - Generally Positive Automation Library v1.0
GPAL The Fluent Automation LIbrary
|
Everything starts here, all the GPAL controls and global settings using fluent syntax are here. GPAL cannot inherit any of the GPAL interfaces since it is a static class, but it does implement them, but will return some GPAL object or interface. More...
Classes | |
| class | GPALEventArgs |
| Used to pass objects of interest when publishing an Information or Exception Channel message NOTE: Properties are contextual to where the Information/Exception is published. Only objects relevant to that context will be passed as an event argument, the rest will be null. In this way, the programmer can examine aspects when the message is published and utilize those for logging or debugging or fault-tolerance handling. Every event will have a GPALObject as applicable to the context publishing the message.. More... | |
Static Public Member Functions | |
| static void | RegisterOCR (Func< OCRInterfaces.IGPALOCR > factory) |
| static IGPALExcel | ExcelFor (GPALFile excelFile) |
| static ICredentials | CredentialsFor (CredentialServiceType credentialServiceType) |
| static IGoogleSheets | GoogleSheetsFor (string spreadsheetName) |
| static IGoogleDrive | GoogleDriveFor (ICredentials credentials) |
| static IGPALGrid< T > | GridForType< T > () |
| static Selector | CssSelector (string css, string selectorName=null) |
| Helper for shorthand notation. | |
| static Selector | XPathSelector (string xpath, string selectorName=null) |
| static GPALFile | FileFor (string path) |
| static IBrowser | BrowserGet (GPALUrl url) |
| static IBrowser | BrowserGoto (GPALUrl url) |
| static GPALButton | ButtonFor (string text) |
| static GPALLabel | LabelFor (string text) |
| static GPALInput | InputFor (string text="") |
| static GPALTextArea | TextAreaFor (string text="") |
| static GPALRichTextBox | RichTextBoxFor (string text="") |
| static GPALCheckbox | CheckboxFor (string text, bool isChecked=false) |
| static GPALRadioButton | RadioButtonFor (string text, bool isChecked=false) |
| static GPALTab | TabFor (string text) |
| static GPALChart | ChartFor (string title="") |
| static GPALComboBox | ComboBoxFor (params string[] items) |
| static GPALDataGridView | DataGridViewFor (params string[] columns) |
| static GPALListView | ListViewFor (params string[] columns) |
| static GPALProgressBar | ProgressBarFor (int maximum=100) |
| static GPALStatusStrip | StatusStripFor (string text="Ready") |
| static GPALNumericUpDown | NumericUpDownFor (decimal minimum=0, decimal maximum=100) |
| static GPALDateTimePicker | DateTimePickerFor (DateTime? value=null) |
| static GPALTreeView | TreeViewFor () |
| static GPALFileSelector | FileSelectorFor (string title="Select File/Folder") |
| static GPALTableLayoutPanel | TableLayoutPanelFor (int columns=1, int rows=1) |
| static Browser.IAllowElementSetting | ElementAssistant (Selector selector) |
| Instantiates a new Browser ElementAssistant object with fluent methods to help you manipulate WebElements in Callback EventHandlers. | |
| static Application.IAllowForSelector | ElementAssistant (Application.Application application) |
| Instantiates a new Application ElementAssistant with fluent methods to help you manipulate AutomationElements in callback EventHandlers. | |
| static void | LoadSettings (GPALFile settingsFile=null) |
| static void | SaveSettings (GPALFile settingsFile=null) |
| static IAllowGraphicSettings | CaptureScreen (Browser.IBrowser browser) |
| Take a screenshot. | |
| static string | MyMethodName () |
| Returns the calling methods name (used in Information/Exception messages). Instead of harcoding method names, call MyMethodName. | |
| static void | PublishSimpleEvent (GPALEventType gPALEventType, string msg, dynamic gPALObject=null, Enums.GPALObjectType gPALObjectType=GPALObjectType.None, Exception ex=null) |
| Publish a message to either the information channel or exception channel (if exception passed in) Publish will insert the calling methods name, so there is no need to call GPAL.MyMethodName() A screenshot is published as well as the Browser/Application object to do what you want with in your handler. | |
| static void | EmitTable< TRow, TCol, TValue > (string title, IDictionary<(TRow row, TCol col), TValue > data, string cornerLabel="", Func< TValue, string > formatCell=null, string emptyCell="-") |
| Emits an ASCII table for any 2-axis keyed dictionary as a single INFO event: row keys down the side, column keys across the top, one cell per (row, col) present in data . Missing cells show emptyCell . Row/column order is the natural order of the key type (enum value, numeric, or string). Cells render via formatCell , defaulting to ToString(). | |
| static void | EmitRuntimeTable (string title, IDictionary<(BrowserType bt, AutomationEngine ae), TimeSpan > runtimes) |
| Convenience wrapper over EmitTable<TRow,TCol,TValue> for test-program bt/ae[/headless] loops: browser types down the side, automation engines across the top, each cell the wall-clock runtime. Call once per headless state with its own title (e.g. "Window" and "Headless"). | |
| static IAllowGPALSettings | AppCallIfFound (Application.Application.CallIfDelegate callIfFound) |
| Global Browser CallIfFound handler called for every selector in every Unit of Work. | |
| static IAllowGPALSettings | AppCallIfNotFound (Application.Application.CallIfDelegate callIfNotFound) |
| Global Browser CallIfNotFound handler called for every selector in every Unit of Work. | |
| static IAllowGPALSettings | CallIfFound (Browser.Browser.CallIfDelegate callIfFound) |
| Global Browser CallIfFound handler called for every selector in every Unit of Work. | |
| static IAllowGPALSettings | CallIfNotFound (Browser.Browser.CallIfDelegate callIfNotFound) |
| Global Browser CallIfNotFound handler called for every selector in every Unit of Work. | |
| static IAllowGPALSettings | WithPublishToConsole (GPALEventType eventType=GPALEventType.INFO|GPALEventType.WARNING|GPALEventType.ERROR|GPALEventType.EXCEPTION|GPALEventType.NOTICE|GPALEventType.CAUTION|GPALEventType.FAILURE) |
| Print the published information or exception messages to the console. | |
| static IAllowGPALSettings | WithPublishToDebug (GPALEventType eventType=GPALEventType.INFO|GPALEventType.WARNING|GPALEventType.ERROR|GPALEventType.EXCEPTION|GPALEventType.NOTICE|GPALEventType.CAUTION|GPALEventType.FAILURE) |
| Indicate which event types to print to the console. Default is none. | |
| static IAllowGPALSettings | WithPublishToLogger (IGPALLogger logger) |
| Print the published information or exception messages to the supplied database. Uses Database Create sql One column for each property in GPALEventArgs. | |
| static IAllowGPALSettings | RemoveLogger (IGPALLogger logger) |
| Stops publishing events to a logger. | |
| static IAllowGPALSettings | WithHandlerEvents (GPALEventType eventTypes) |
| Which event types reach the handlers given to WithInformationHandler and WithExceptionHandler. All of them by default. Building an event costs a stack capture, and that cost is paid whenever anything wants the event. An attached handler wants everything unless it says otherwise, so an application showing events on screen should name the ones it shows: DEEPDEBUG alone is thousands of events a run. | |
| static IAllowGPALSettings | WithPublishStackTrace (bool trueFalse=true) |
| Print the stack trace along with the published GPAL message. | |
| static IAllowGPALSettings | CallOnFail (Browser.Browser.CallOnFailDelegate callOnFail) |
| Add a handler to be called when something fails that the workflow is in a position to decide about, on any browser that has no handler of its own. GPAL fails forward, so without a handler the failure is reported and the run carries on. A handler is how a workflow takes a different decision instead. The browser it is handed is what tells one workflow from another when several are running against this one handler. | |
| static IAllowGPALSettings | WithDefaultErrorPlaceholder (string message="##UNABLE TO GET##") |
| When GPAL is unable to retrieve data from an element, this message will be placed in the grid. GPAL will always strive to give you as much data as possible until you get your selectors perfected. | |
| static IAllowGPALSettings | WithDownloadTimeoutInSec (int seconds) |
| Set the default timeout time in seconds to wait for a download to start The default is 60 seconds. | |
| static IAllowGPALSettings | WithNoFallbackActions (bool trueFalse=true) |
| GPAL has fallback alternatives for actions should they fail, generally applies to selenium. The fallback involves javascript alternative to complete the action. Set this to true to NOT use try any fallback recovery, just fail this is set to false by default, if used with no parameter the default is true. | |
| static IAllowGPALSettings | WithAllThatMatch (int matchCount=int.MaxValue) |
| Global value for selector matches so it's not set UOW at a time. | |
| static IAllowGPALSettings | WithAutoUpdateWebDriver (bool trueFalse=true) |
| Automatically download and unzip the web driver that matches the version of the browser being run. This uses setting which will be in the GPAL.yaml configuration file which is loaded on startup (or loaded on-demand with a path). this is set to false by default, if used with no parameter the default is true. | |
| static IAllowGPALSettings | WithAutomationEngine (AutomationEngine automationEngine) |
| Set the automation type to use for all browsers. NOTE: can be overridden at the selector level (to choose javascript or hardware). | |
| static IAllowGPALSettings | WithDriverLocation (string driverPath) |
| The location of the browser drivers to be used for each GPAL.Browser instance. This can be overridden at the GPAL.Browser level, as well. Additionally, if not defined, the default location is the same directory as the GPAL executable. | |
| static IAllowGPALSettings | WithTempDirectory (string tempPath) |
| Where GPAL puts files it had to create but nobody asked to keep, such as a GPALFile given a url rather than a path. When not set, a GPALfilesSafeToDelete folder beside the executable, created on first use. The name is the documentation: nothing in there is anyone's data, and deleting the lot costs nothing. | |
| static IAllowGPALSettings | WithTypingDelay (int delayInTicks) |
| Sets the ceiling for the inter-character typing delay used by SendString across every automation engine (Hardware, Selenium, Puppeteer/CDP, OttoMagic). Default is 0 (no pacing - the whole string is sent atomically). When greater than 0, SendString dispatches the text character-by-character, sleeping a random duration between Math.Min(25, delayInTicks) and delayInTicks milliseconds before each character - not a fixed pause. A constant, identical gap between every keystroke is itself a detectable signature, so this value is a ceiling on a randomized range rather than the pace itself. | |
| static IAllowGPALSettings | WithImageMatchingPercentage (int matchPercent) |
| Sets the image matching percentage for image Selectors. . | |
| static IAllowGPALSettings | WithSimulateMouseMovement (bool trueFalse=true) |
| Global setting to simulate a human moving the mouse to the next point for all commands. Default is false. | |
| static IAllowGPALSettings | WithStopOnNotFound (bool trueFalse=true) |
| Global setting instructing GPAL to terminate if any Selector cannot find any elements. This is the GLOBAL setting affecting all Selectors. This setting is also available on individual selectors to only stop on critical Selectors. Default is false. | |
| static IAllowGPALSettings | WithTempProfileDirectory (string tempProfileDirectory) |
| static IAllowGPALSettings | WithExceptionHandler (EventHandler< GPALEventArgs > eventHandler) |
| Set the handler to receive handled Exception messages from GPAL. GPAL also sets an unhandled exception handler and will publish unhandled exceptions to this channel as well. GPAL will terminate on unhandled exceptions after publishing to the channel. | |
| static IAllowGPALSettings | WithPromptBeforeUnexpectedExit (bool trueFalse=true) |
| Prompt 'Press any key...' before terminating due to an uncaught exception. GPAL tries to handle all exceptions and continue running, publishing events with more information. | |
| static IAllowGPALSettings | WithInformationHandler (EventHandler< GPALEventArgs > eventHandler) |
| Set the handler to receive Information messages from GPAL which you might like to know about. . | |
| static IAllowGPALSettings | WithWaitFor (int waitForInTicks) |
| Global setting to wait for time in ticks for an element to show up. Applied to every element in every workflow. Override in a unit of work using this pattern .WithSelector(select0or) .WaitFor(waitForInTicks) .LeftClick() NOTE: shortcut actions like LeftClick{selector) will not waitfor and no syntax will make them wait except this global setting. | |
| static IAllowGPALSettings | WithTakeEventScreenshot (bool trueOrFalse) |
Properties | |
| static byte | VK_ALT [get] |
| Alt key virtual keycode (VK) for use with keybd_event. https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes. | |
| static byte | VK_DELETE [get] |
| Delete key virtual keycode (VK) for use with keybd_event. | |
| static byte | VK_F10 [get] |
| F10 key virtual keycode (VK) for use with keybd_event. | |
| static byte | VK_PRIOR [get] |
| Page Up key virtual keycode (VK) for use with keybd_event. | |
| static byte | VK_NEXT [get] |
| Page Down key virtual keycode (VK) for use with keybd_event. | |
| static byte | VK_END [get] |
| End key virtual keycode (VK) for use with keybd_event. | |
| static byte | VK_HOME [get] |
| Home key virtual keycode (VK) for use with keybd_event. | |
| static byte | VK_DOWN [get] |
| Down Arrow key virtual keycode (VK) for use with keybd_event. | |
| static byte | VK_UP [get] |
| Up Arrow key virtual keycode (VK) for use with keybd_event. | |
| static byte | VK_TAB [get] |
| Tab key virtual keycode (VK) for use with keybd_event. | |
| static byte | VK_RETURN [get] |
| Enter/Return key virtual keycode (VK) for use with keybd_event. | |
| static byte | VK_SHIFT_RIGHT [get] |
| Right Shift key virtual keycode (VK) for use with keybd_event. | |
| static byte | VK_SHIFT_LEFT [get] |
| Left Shift key virtual keycode (VK) for use with keybd_event. | |
| static byte | VK_CONTROL_LEFT [get] |
| Left Control key virtual keycode (VK) for use with keybd_event. | |
| static byte | VK_CONTROL_RIGHT [get] |
| Right Control key virtual keycode (VK) for use with keybd_event. | |
| static byte | VK_LWIN [get] |
| Left Windows key virtual keycode (VK) for use with keybd_event. | |
| static byte | VK_RWIN [get] |
| Right Windows key virtual keycode (VK) for use with keybd_event. | |
| static byte | VK_SCROLL [get] |
| Scroll Lock key virtual keycode (VK) for use with keybd_event. | |
| static byte | VK_LMENU [get] |
| Left Alt key virtual keycode (VK) for use with keybd_event. | |
| static byte | VK_RMENU [get] |
| Right Alt key virtual keycode (VK) for use with keybd_event. | |
| static byte | VK_APPS [get] |
| Application (Menu) key virtual keycode (VK) for use with keybd_event. | |
| static byte | VK_SPACE [get] |
| Space bar key virtual keycode (VK) for use with keybd_event. | |
| static byte | VK_BACK [get] |
| Backspace key virtual keycode (VK) for use with keybd_event. | |
| static uint | KEYEVENTF_EXTENDEDKEY [get] |
| The extended-key flag indicates whether the keystroke message originated from one of the additional keys on the enhanced keyboard. The extended keys consist of the ALT and CTRL keys on the right-hand side of the keyboard; the INS, DEL, HOME, END, PAGE UP, PAGE DOWN, and arrow keys in the clusters to the left of the numeric keypad; the NUM LOCK key; the BREAK (CTRL+PAUSE) key; the PRINT SCRN key; and the divide (/) and ENTER keys in the numeric keypad. The extended-key flag is set if the key is a extended key For use with keybd_event. | |
| static uint | KEYEVENTF_KEYUP [get] |
| Indicates a keyup keystroke is being sent. For use with keybd_event. | |
| static List< IGPALLogger > | LoggerList = new List<IGPALLogger>() [get] |
| static GPALSettings | GPALSettings [get, set] |
| static Cryptography | Cryptography [get] |
| static Base64Helper | Base64Helper [get] |
| static IAllowAIProvider | AI [get] |
| Entry point for the GPAL AI subsystem, providing a fluent interface for AI tasks. | |
| static IGPALYouTube | YouTube [get] |
| static OCRInterfaces.IGPALOCR | OCR [get] |
| static IImageHelper | ImageHelper [get] |
| static IAllowFileName | File [get] |
| Instantiates a new fluent File SETTINGS object. This data object defines settings for use by the .FillInFrom method. | |
| static IAllowGridActions< string > | Grid [get] |
| New GPALGrid<string></string> (rows/columns). | |
| static IAllowLoggingSettings | Logger [get] |
| New GPAL Logger. | |
| static IAllowEmailServerSettings | Mail [get] |
| New GPAL Mail handler. | |
| static IAllowConverterInput | Converter [get] |
| New GPAL Convertor. | |
| static IAllowApplicationOpenOrParameters | Application [get] |
| Instantiates a new fluent Application object. | |
| static IAllowBrowserTypeOrGoto | Browser [get] |
| Instantiates a new fluent Browser object. | |
| static IAllowDatabaseSettings | Database [get] |
| Instantiates a new fluent Database SETTINGS object. This data object defines settings for use by .FillInFrom method. | |
| static IAllowSelectorSettings | Selector [get] |
| Instantiates a new fluent GPAL Selector object used to locate an element. Selectors are for browsers or applications. . | |
| static IAllowRequestSettings | Request [get] |
| Start describing an API request for .Fetch to issue from inside the page, so it carries the session the browser has already earned rather than a fresh connection of its own. | |
| static IAllowExecutableSetup | Launcher [get] |
| static IAllowRESTEndpoint | RESTClient [get] |
| Instantiate a new fluent RESTClient. | |
| static IAllowCredentialServiceType | Credentials [get] |
| Return a new credential manager. | |
| static IAllowGiven | Gherkin [get] |
| static IAllowSpreadsheetSelection | GoogleSheets [get] |
| New Googlesheets workflow. | |
| static IAllowDriveCredentials | GoogleDrive [get] |
| New GoogleDrive workflow. | |
| static IGPALExcel | Excel [get] |
| static IAllowGPALUrlForUrl | Url [get] |
| static IAllowFormSettings | Form [get] |
| Instantiates a new GPALForm for creating simple interactive user interfaces. | |
| static IAllowControlSettingsEnabledAndDefault | Button [get] |
| Instantiates a new GPALButton for use on GPAL forms. Callback EventHandler is invoked on the GPALButton.WindowsControl.Clicked event. | |
| static IAllowControlSettingsAndChartSettings | Chart [get] |
| Instantiates a new GPALChart for use on GPAL forms. Callback EventHandler is invoked on the GPALChart.WindowsControl.Clicked event. | |
| static IAllowControlSettingsEnabledAndChecked | Checkbox [get] |
| Instantiates a new GPALCheckbox for use on a GPAL form. Callback EventHandler is invoked on the GPALCheckbox.WindowsControl.CheckChanged event. Default is not checked. | |
| static IAllowComboBoxControlSettings | ComboBox [get] |
| Instantiates a new GPALComboBox for use on a GPAL form. Callback(s) set via WhenSelectedDo are invoked on the underlying ComboBox.SelectedIndexChanged event. | |
| static IAllowDataGridViewControlSettings | DataGridView [get] |
| Instantiates a new GPALDataGridView for use on a GPAL form. Callback EventHandler is invoked on the GPALDataGridView.WindowsControl.CellValueChanged event (or other events when specified via .ForEvent). Supports tabular data display with columns and optional editing. | |
| static IAllowDateTimePickerControlSettings | DateTimePicker [get] |
| Instantiates a new GPALDateTimePicker for use on a GPAL form. Callback EventHandler is invoked on the GPALDateTimePicker.WindowsControl.ValueChanged event (or other events when specified via .ForEvent). | |
| static IAllowFileSelectorControlSettings | FileSelector [get] |
| Instantiates a new GPALFileSelector for use on a GPAL form. Opens a standard file or folder selection dialog when clicked. Callback EventHandler is invoked after a selection is made (or canceled), with FileSelectorEventArgs containing the selected path(s) and cancellation status. Selected path(s) available via SelectedPath / SelectedPaths properties. | |
| static IAllowControlSettingsPlaceholderEnabledAndPassword | Input [get] |
| Instantiates a new one-line GPALInput control for use on a GPAL form. Callback EventHandler is invoked on the GPALInput.WindowsControl.TextChanged event. | |
| static IAllowControlSettingsAndFontSettings | Label [get] |
| Instantiates a new GPALLabel for use on a GPAL form. Callback EventHandler is invoked on the GPALLabel.WindowsControl.Clicked event. | |
| static IAllowListVIewControlSettings | ListView [get] |
| Instantiates a new GPALListView for use on a GPAL form. Callback EventHandler is invoked on the GPALListView.WindowsControl.SelectedIndexChanged event (or other events when specified via .ForEvent). Supports columns, different view modes (Details, List, etc.), selection, and double-click activation. | |
| static IAllowNumericUpDownControlSettings | NumericUpDown [get] |
| Instantiates a new GPALNumericUpDown for use on a GPAL form. Callback EventHandler is invoked on the GPALNumericUpDown.WindowsControl.ValueChanged event (or other events when specified via .ForEvent). Useful for selecting numeric values such as timeouts, retry counts, ports, etc. | |
| static IAllowProgressBarControlSettings | ProgressBar [get] |
| A progress bar control for GPAL forms. Displays task completion percentage or indeterminate (marquee) activity. Callback (if set) is invoked on the ValueChanged event of the underlying ProgressBar. | |
| static IAllowControlSettingsEnabledAndChecked | RadioButton [get] |
| Instantiates a new GPALRadioButton for use on a GPAL form. Callback EventHandler is invoked on the GPALRadioButton.WindowsControl.CheckChanged event. Default is not selected. | |
| static IAllowStatusStripControlSettings | StatusStrip [get] |
| A status strip control (docked at the bottom) for GPAL forms. Displays real-time status messages, browser info, file counts, etc. Callback (if set) is invoked on the primary StatusStrip event (usually ItemClicked or similar). | |
| static IAllowMenuBarControlSettings | MenuBar [get] |
| A menu bar docked to the top of a GPAL form. Open a top-level menu with WithMenu("TopMenu"), then attach GPAL.BarItem items with WithItem(item). | |
| static IAllowBarItemSettings | BarItem [get] |
| A single item shared by menu bars and toolbars: text, optional image, optional shortcut key, and a callback wired to its click. | |
| static IAllowToolbarControlSettings | Toolbar [get] |
| A toolbar docked below the menu bar, holding GPAL.BarItem buttons and optional separators. | |
| static IAllowControlSettings | Tab [get] |
| Instantiates a new GPALTab for use on a GPAL form. Callback EventHandler is invoked on the GPALTab.WindowsControl.Clicked event. | |
| static IAllowSplitterControlSettings | Splitter [get] |
| Instantiates a new GPALSplitter for use on a GPAL form: two panes with a bar between them, built whole and then laid out like any other control. Call .HSplit for a left and right pane or .VSplit for a top and bottom, add the controls of both panes in order, and mark where the first pane ends with SplitRight or SplitBottom. . | |
| static IAllowGroupBoxControlSettings | GroupBox [get] |
| Instantiates a new GPALGroupBox for use on a GPAL form: a titled box around a set of controls, laid out like any other control. A container can go inside it, so a group box can hold a splitter. | |
| static GPALSpliter | SplitRight [get] |
| Marks the end of a splitter's left pane. Everything added after it is the right pane. | |
| static GPALSpliter | SplitBottom [get] |
| Marks the end of a splitter's top pane. Everything added after it is the bottom pane. | |
| static IAllowControlSettingsAndEnabled | TextArea [get] |
| Instantiates a new GPALTextArea for use on a GPAL form. Callback EventHandler is invoked on the GPALTextarea.WindowsControl.TextChanged event. | |
| static IAllowRichTextBoxControlSettings | RichTextBox [get] |
| Instantiates a new GPALRichTextBox for use on a GPAL form. Renders Markdown (headings, bold, and bullet/numbered lists with nesting) - useful for displaying formatted AI responses or other structured text. | |
| static IAllowTreeViewControlSettings | TreeView [get] |
| Instantiates a new GPALTreeView for use on a GPAL form. Callback EventHandler is invoked on the GPALTreeView.WindowsControl.AfterSelect event (or other events when specified via .ForEvent). Supports hierarchical node display (folders, categories, workflows, etc.). | |
| static bool | UseHardware [get] |
| static bool | UseJavaSCript [get] |
| static Browser.IAllowScheduledWorkflow | Workflow [get] |
| Runs whole workflows at once, each building and owning whatever it drives, so one can run Chrome on OttoMagic while the next runs Firefox on Selenium. Scheduling only: see Browser.Browser.WithWorkflow(Action<Browser.IBrowser>) for several steps against one browser you already have. | |
| static Browser.IHiddenDesktops | HiddenDesktop [get] |
| Every hidden desktop this process has made, and the screen itself. Peek puts one on the screen and puts yours back afterwards, Return does it early from any thread, and CloseAll gives up the handles. A browser hands back the one desktop it is on through its own HiddenDesktop, so this is for the operations that belong to the screen rather than to one desktop. | |
| static string | Version [get] |
| static string | OAuthTokenUrl [get, set] |
| Where an OAuth redirect lands and the token is read back from, e.g. http://localhost:3117/. Set while a credential is being consumed: a browser running OttoMagic already has a GPALRestAPI of its own, and anything else gets a listener bound on a free port for the one exchange. | |
Everything starts here, all the GPAL controls and global settings using fluent syntax are here. GPAL cannot inherit any of the GPAL interfaces since it is a static class, but it does implement them, but will return some GPAL object or interface.
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Add a handler to be called when something fails that the workflow is in a position to decide about, on any browser that has no handler of its own.
GPAL fails forward, so without a handler the failure is reported and the run carries on. A handler is how a workflow takes a different decision instead. The browser it is handed is what tells one workflow from another when several are running against this one handler.
| callOnFail | Callback delegate |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Helper for shorthand notation.
| css |
|
static |
|
static |
|
static |
Instantiates a new Application ElementAssistant with fluent methods to help you manipulate AutomationElements in callback EventHandlers.
| application | Application object associated with the elements/callback |
|
static |
Instantiates a new Browser ElementAssistant object with fluent methods to help you manipulate WebElements in Callback EventHandlers.
| browser | Browser object associated with the elements/callback |
|
static |
Convenience wrapper over EmitTable<TRow,TCol,TValue> for test-program bt/ae[/headless] loops: browser types down the side, automation engines across the top, each cell the wall-clock runtime. Call once per headless state with its own title (e.g. "Window" and "Headless").
|
static |
Emits an ASCII table for any 2-axis keyed dictionary as a single INFO event: row keys down the side, column keys across the top, one cell per (row, col) present in data . Missing cells show emptyCell . Row/column order is the natural order of the key type (enum value, numeric, or string). Cells render via formatCell , defaulting to ToString().
| title | Heading shown above the table. |
| data | Values keyed by (row, col). |
| cornerLabel | Label for the top-left corner (the row axis name). |
| formatCell | Optional per-value formatter; defaults to ToString(). |
| emptyCell | Text for a (row, col) pair absent from the data. |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Publish a message to either the information channel or exception channel (if exception passed in) Publish will insert the calling methods name, so there is no need to call GPAL.MyMethodName() A screenshot is published as well as the Browser/Application object to do what you want with in your handler.
| msg | Message to publish |
| gPALObject | GPAL object [Application, Browser, GPALForm, UnitOfWork] |
| gPALObjectType | The type of GPAL object passed in |
| ex | [Optional]Exception raised |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Automatically download and unzip the web driver that matches the version of the browser being run. This uses setting which will be in the GPAL.yaml configuration file which is loaded on startup (or loaded on-demand with a path). this is set to false by default, if used with no parameter the default is true.
| trueFalse | Auto Update? [true] |
|
static |
When GPAL is unable to retrieve data from an element, this message will be placed in the grid.
GPAL will always strive to give you as much data as possible until you get your selectors perfected.
| message | The message to substitute for no data. "##UNABLE TO GET##" [default] |
|
static |
|
static |
The location of the browser drivers to be used for each GPAL.Browser instance.
This can be overridden at the GPAL.Browser level, as well.
Additionally, if not defined, the default location is the same directory as the GPAL executable.
| driverPath | Path to the drivers folder |
|
static |
Set the handler to receive handled Exception messages from GPAL.
GPAL also sets an unhandled exception handler and will publish unhandled exceptions to this channel as well.
GPAL will terminate on unhandled exceptions after publishing to the channel.
| eventHandler | Your Exception channel event handler |
|
static |
Which event types reach the handlers given to WithInformationHandler and WithExceptionHandler. All of them by default.
Building an event costs a stack capture, and that cost is paid whenever anything wants the event. An attached handler wants everything unless it says otherwise, so an application showing events on screen should name the ones it shows: DEEPDEBUG alone is thousands of events a run.
| eventTypes | The event types to hand over. |
|
static |
Sets the image matching percentage for image Selectors.
.
| matchPercent | Image matching percentage [default is 80 (80%)] |
|
static |
Set the handler to receive Information messages from GPAL which you might like to know about.
.
| eventHandler | Your Information channel event handler |
|
static |
GPAL has fallback alternatives for actions should they fail, generally applies to selenium. The fallback involves javascript alternative to complete the action. Set this to true to NOT use try any fallback recovery, just fail this is set to false by default, if used with no parameter the default is true.
| trueFalse | Use fallback recovery? [true] |
|
static |
Prompt 'Press any key...' before terminating due to an uncaught exception. GPAL tries to handle all exceptions and continue running, publishing events with more information.
| trueFalse | true - prompt before exit false [default] - just exit |
|
static |
|
static |
|
static |
|
static |
Print the published information or exception messages to the supplied database. Uses Database Create sql One column for each property in GPALEventArgs.
| logger | publish events to this logger, which writes them wherever it was pointed |
|
static |
Global setting to simulate a human moving the mouse to the next point for all commands.
Default is false.
| moveWithArc | True to move the mouse to the elements emulating a human False [default] to jump the cursor the element |
|
static |
Global setting instructing GPAL to terminate if any Selector cannot find any elements.
This is the GLOBAL setting affecting all Selectors.
This setting is also available on individual selectors to only stop on critical Selectors.
Default is false.
| stopOnNotFound | True to terminate the application is an element is not found False [default] to continue. |
|
static |
|
static |
Where GPAL puts files it had to create but nobody asked to keep, such as a GPALFile given a url rather than a path.
When not set, a GPALfilesSafeToDelete folder beside the executable, created on first use. The name is the documentation: nothing in there is anyone's data, and deleting the lot costs nothing.
| tempPath | Folder for GPAL's own throwaway files |
|
static |
|
static |
Sets the ceiling for the inter-character typing delay used by SendString across every automation engine (Hardware, Selenium, Puppeteer/CDP, OttoMagic).
Default is 0 (no pacing - the whole string is sent atomically).
When greater than 0, SendString dispatches the text character-by-character, sleeping a random duration between Math.Min(25, delayInTicks) and delayInTicks milliseconds before each character - not a fixed pause. A constant, identical gap between every keystroke is itself a detectable signature, so this value is a ceiling on a randomized range rather than the pace itself.
SendString vs. FillIn (FillInAppend/FillInInsert/FillInOverwrite):
SendString simulates a user typing: it dispatches real key events one character at a time and is the only typing primitive that honors this setting. Use it when the target field reacts to individual keystrokes (autocomplete, input masks, JS keyup validation) or when the interaction needs to look human.
FillIn* sets the field's value directly (its fast path) and does NOT honor this setting - it stays atomic regardless of TypingDelay. Its optional delayMs parameter only paces the per-character fallback used if the fast-path assignment fails (e.g. a stubborn custom control). Use FillIn* for ordinary form filling where speed and reliability matter more than realism.
| delayInTicks | Ceiling for the randomized inter-character delay, in milliseconds |
|
static |
Global setting to wait for time in ticks for an element to show up. Applied to every element in every workflow. Override in a unit of work using this pattern .WithSelector(select0or) .WaitFor(waitForInTicks) .LeftClick() NOTE: shortcut actions like LeftClick{selector) will not waitfor and no syntax will make them wait except this global setting.
| waitForInTicks |
|
static |
|
staticget |
Entry point for the GPAL AI subsystem, providing a fluent interface for AI tasks.
|
staticget |
Instantiates a new fluent Application object.
1
|
staticget |
A single item shared by menu bars and toolbars: text, optional image, optional shortcut key, and a callback wired to its click.
|
staticget |
Instantiates a new fluent Browser object.
|
staticget |
Instantiates a new GPALButton for use on GPAL forms.
Callback EventHandler is invoked on the GPALButton.WindowsControl.Clicked event.
|
staticget |
Instantiates a new GPALChart for use on GPAL forms.
Callback EventHandler is invoked on the GPALChart.WindowsControl.Clicked event.
|
staticget |
Instantiates a new GPALCheckbox for use on a GPAL form.
Callback EventHandler is invoked on the GPALCheckbox.WindowsControl.CheckChanged event.
Default is not checked.
|
staticget |
Instantiates a new GPALComboBox for use on a GPAL form.
Callback(s) set via WhenSelectedDo are invoked on the underlying ComboBox.SelectedIndexChanged event.
|
staticget |
|
staticget |
|
staticget |
Instantiates a new fluent Database SETTINGS object.
This data object defines settings for use by .FillInFrom method.
|
staticget |
Instantiates a new GPALDataGridView for use on a GPAL form.
Callback EventHandler is invoked on the GPALDataGridView.WindowsControl.CellValueChanged event (or other events when specified via .ForEvent). Supports tabular data display with columns and optional editing.
|
staticget |
Instantiates a new GPALDateTimePicker for use on a GPAL form.
Callback EventHandler is invoked on the GPALDateTimePicker.WindowsControl.ValueChanged event (or other events when specified via .ForEvent).
|
staticget |
|
staticget |
Instantiates a new fluent File SETTINGS object.
This data object defines settings for use by the .FillInFrom method.
|
staticget |
Instantiates a new GPALFileSelector for use on a GPAL form.
Opens a standard file or folder selection dialog when clicked.
Callback EventHandler is invoked after a selection is made (or canceled), with FileSelectorEventArgs containing the selected path(s) and cancellation status.
Selected path(s) available via SelectedPath / SelectedPaths properties.
|
staticget |
Instantiates a new GPALForm for creating simple interactive user interfaces.
|
staticget |
|
staticget |
New GoogleDrive workflow.
|
staticget |
|
staticgetset |
|
staticget |
|
staticget |
Instantiates a new GPALGroupBox for use on a GPAL form: a titled box around a set of controls, laid out like any other control. A container can go inside it, so a group box can hold a splitter.
|
staticget |
Every hidden desktop this process has made, and the screen itself. Peek puts one on the screen and puts yours back afterwards, Return does it early from any thread, and CloseAll gives up the handles.
A browser hands back the one desktop it is on through its own HiddenDesktop, so this is for the operations that belong to the screen rather than to one desktop.
|
staticget |
|
staticget |
Instantiates a new one-line GPALInput control for use on a GPAL form.
Callback EventHandler is invoked on the GPALInput.WindowsControl.TextChanged event.
|
staticget |
The extended-key flag indicates whether the keystroke message originated from one of the additional keys on the enhanced keyboard. The extended keys consist of the ALT and CTRL keys on the right-hand side of the keyboard; the INS, DEL, HOME, END, PAGE UP, PAGE DOWN, and arrow keys in the clusters to the left of the numeric keypad; the NUM LOCK key; the BREAK (CTRL+PAUSE) key; the PRINT SCRN key; and the divide (/) and ENTER keys in the numeric keypad. The extended-key flag is set if the key is a extended key For use with keybd_event.
|
staticget |
|
staticget |
Instantiates a new GPALLabel for use on a GPAL form.
Callback EventHandler is invoked on the GPALLabel.WindowsControl.Clicked event.
|
staticget |
|
staticget |
Instantiates a new GPALListView for use on a GPAL form.
Callback EventHandler is invoked on the GPALListView.WindowsControl.SelectedIndexChanged event (or other events when specified via .ForEvent).
Supports columns, different view modes (Details, List, etc.), selection, and double-click activation.
|
staticget |
|
staticget |
|
staticget |
|
staticget |
A menu bar docked to the top of a GPAL form.
Open a top-level menu with WithMenu("TopMenu"), then attach GPAL.BarItem items with WithItem(item).
|
staticget |
Instantiates a new GPALNumericUpDown for use on a GPAL form.
Callback EventHandler is invoked on the GPALNumericUpDown.WindowsControl.ValueChanged event (or other events when specified via .ForEvent). Useful for selecting numeric values such as timeouts, retry counts, ports, etc.
|
staticgetset |
Where an OAuth redirect lands and the token is read back from, e.g. http://localhost:3117/. Set while a credential is being consumed: a browser running OttoMagic already has a GPALRestAPI of its own, and anything else gets a listener bound on a free port for the one exchange.
|
staticget |
|
staticget |
A progress bar control for GPAL forms.
Displays task completion percentage or indeterminate (marquee) activity.
Callback (if set) is invoked on the ValueChanged event of the underlying ProgressBar.
|
staticget |
Instantiates a new GPALRadioButton for use on a GPAL form.
Callback EventHandler is invoked on the GPALRadioButton.WindowsControl.CheckChanged event.
Default is not selected.
|
staticget |
Start describing an API request for .Fetch to issue from inside the page, so it carries the session the browser has already earned rather than a fresh connection of its own.
|
staticget |
Instantiate a new fluent RESTClient.
|
staticget |
Instantiates a new GPALRichTextBox for use on a GPAL form.
Renders Markdown (headings, bold, and bullet/numbered lists with nesting) - useful for displaying formatted AI responses or other structured text.
|
staticget |
Instantiates a new fluent GPAL Selector object used to locate an element.
Selectors are for browsers or applications.
.
|
staticget |
|
staticget |
|
staticget |
Instantiates a new GPALSplitter for use on a GPAL form: two panes with a bar between them, built whole and then laid out like any other control.
Call .HSplit for a left and right pane or .VSplit for a top and bottom, add the controls of both panes in order, and mark where the first pane ends with SplitRight or SplitBottom. .
|
staticget |
A status strip control (docked at the bottom) for GPAL forms.
Displays real-time status messages, browser info, file counts, etc.
Callback (if set) is invoked on the primary StatusStrip event (usually ItemClicked or similar).
|
staticget |
Instantiates a new GPALTab for use on a GPAL form.
Callback EventHandler is invoked on the GPALTab.WindowsControl.Clicked event.
|
staticget |
Instantiates a new GPALTextArea for use on a GPAL form.
Callback EventHandler is invoked on the GPALTextarea.WindowsControl.TextChanged event.
|
staticget |
A toolbar docked below the menu bar, holding GPAL.BarItem buttons and optional separators.
|
staticget |
Instantiates a new GPALTreeView for use on a GPAL form.
Callback EventHandler is invoked on the GPALTreeView.WindowsControl.AfterSelect event (or other events when specified via .ForEvent). Supports hierarchical node display (folders, categories, workflows, etc.).
|
staticget |
|
staticget |
Alt key virtual keycode (VK) for use with keybd_event. https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes.
|
staticget |
Application (Menu) key virtual keycode (VK) for use with keybd_event.
|
staticget |
|
staticget |
|
staticget |
|
staticget |
|
staticget |
|
staticget |
|
staticget |
|
staticget |
|
staticget |
|
staticget |
|
staticget |
|
staticget |
|
staticget |
|
staticget |
|
staticget |
|
staticget |
|
staticget |
|
staticget |
|
staticget |
|
staticget |
|
staticget |
|
staticget |
Runs whole workflows at once, each building and owning whatever it drives, so one can run Chrome on OttoMagic while the next runs Firefox on Selenium. Scheduling only: see Browser.Browser.WithWorkflow(Action<Browser.IBrowser>) for several steps against one browser you already have.
|
staticget |