GPAL - Generally Positive Automation Library v1.0
GPAL The Fluent Automation LIbrary
Loading...
Searching...
No Matches
IApplication.cs
1// =============================================================================
2// GPAL - Generally Positive Automation Library
3// Copyright © 2026 Software Decisions, Inc. All rights reserved.
4//
5// This file is part of GPAL.
6// Licensed under the Business Source License 1.1
7//
8// Primary development, architecture, and vision by Michael B. Vederman,
9// CEO of Software Decisions, Inc., Texas.
10//
11// Internal development maintained privately.
12// Public releases appear on GitHub: https://github.com/SoftwareDecisionsInc/GPAL.
13//
14// See LICENSE for full terms, including Additional Use Grant.
15// =============================================================================
16
17using System;
18using System.Collections.Generic;
19using System.Diagnostics;
20using System.Windows.Automation;
22
23
25{
26 [Obsolete]
27 public interface IApplication
28 {
29 UnitOfWork CurrentUOW { get; set; }
30 object ManagedRootAutomationElement { get; set; }
33 string Name { get; set; }
34 Process Process { get; set; }
35 IAllowAllApplicationAndAllSelector Restore { get; }
36 AutomationElement RootAutomationElement { get; set; }
37 IAllowAfterAnySelectorExceptWithAll WithAllThatMatch(int rowCount = int.MaxValue);
38
39 IAllowSelectorActionOrAnySelector AppendFrom(GPALDatabase inputDatabase);
40 IAllowSelectorActionOrAnySelector AppendFrom(IGPALFile inputFile);
41 IAllowSelectorActionOrAnySelector AppendFrom(IGPALGrid<string> inputGrid);
42 IAllowSelectorActionOrAnySelector AppendFrom(string textToUse);
43 IAllowAfterAnySelector CallAfterFillIn(Application.CallAfterFillInDelegate callAfterFillIn);
44 IAllowAfterAnySelector CallIfFound(Application.CallIfDelegate callIfFoundDelegate);
45 IAllowAfterAnySelector CallIfNotFound(Application.CallIfDelegate callIfNotFoundDelegate);
46 void Close();
47 IAllowAllActionAndAnySelector CloseTab(string URL);
48 IAllowSelectorActionOrAnySelector FillInFrom(GPALDatabase inputDatabase);
49 IAllowSelectorActionOrAnySelector FillInFrom(IGPALFile inputFile);
50 IAllowSelectorActionOrAnySelector FillInFrom(IGPALGrid<string> inputGrid);
51 IAllowSelectorActionOrAnySelector FillInFrom(string textToUse);
54 IAllowSelectorActionOrAnySelector InsertFromDatabase(GPALDatabase inputDatabase);
55 IAllowSelectorActionOrAnySelector InsertFromFile(IGPALFile inputFile);
56 IAllowSelectorActionOrAnySelector InsertFromGrid(IGPALGrid<string> inputGrid);
57 IAllowSelectorActionOrAnySelector InsertFrom(string textToUse);
58 IAllowSelectorActionOrAnySelector LeftClick(Enums.ModifierKeys modifierKeys);
59 IAllowSelectorActionOrAnySelector LeftClickAndDownload(string filename);
60 IAllowSelectorActionOrAnySelector LeftDoubleClick();
63 IAllowAllApplicationAndAllSelector Open(string applicationPath);
64 IAllowPersistentCallBack PersistentCallIfFound(Application.CallIfDelegate persistentCallIfFound);
65 IAllowPersistentCallBack PersistentCallIfNotFound(Application.CallIfDelegate persistentCallIfNotFound);
67 void RemoveCallIfHandlerEverywhere(Application.CallIfDelegate func);
69 IAllowAfterWaitForAndSizeControl WaitFor(int timeoutInTicks);
70 IAllowAfterWaitForAndSizeControl WaitForWindow(string windowTitle);
71 IAllowAfterWaitForAndSizeControl WaitForWindowRegex(string _);
72 IAllowPersistence WithPersistentSelector(Selector selector);
73 IAllowAfterAnySelector WithSelector(Selector selector);
74 IAllowAfterWaitForAndSizeControl WithWaitForWindowTimeout(int waitTimeInSeconds);
75 }
76}
Application object that contains the fluent methods to create your Application workflow....
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...
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 selec...
Class to define database usage. Currently only used for input from a table, sql or stored procedure....
GPAL Selector used to locate Application and Browser elements. Instantiated with GPAL....
Definition Selector.cs:56
Everything revolves around the Unit of Work. A Unit of Work is defined as one or more selectors betw...
Definition UnitOfWork.cs:39
string Name
A name you provide to be used when publishing events. Use .WithName to provide your own friendly nam...
AutomationElement RootAutomationElement
The starting AutomationElement for the application. All xpath searches start from this AutomationElem...