GPAL - Generally Positive Automation Library v1.0
GPAL The Fluent Automation LIbrary
Loading...
Searching...
No Matches
Interfaces.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
18using MimeKit;
19using OpenQA.Selenium;
20using System;
21using System.Collections.Generic;
22using System.Diagnostics;
23using System.Drawing;
24using System.Linq;
25using System.Text;
26using System.Threading.Tasks;
27using System.Windows.Forms.DataVisualization.Charting;
28using static GenerallyPositive.Enums;
29using static GenerallyPositive.GPAL;
32using static GenerallyPositive.RESTClient;
33
34namespace GenerallyPositive
35{
36 #region <Selector Settings>
37 [Interface(Description = "Selector Settings")]
38 public interface IAllowSelectorSettings : IAllowCallBack, IAllowToGPALObject<Selector>
39 {
40 [Selector(Description = "Locate element with OCR using the text to find")]
41 IAllowSelectorSettings WithOCR(string textToFind);
42 [Selector(Description = "Locate element using a CSS path (browser only)")]
43 IAllowSelectorSettings WithCSS(string CSS);
44 [Selector(Description = "Locate element matching a partial or full HRef (browser only)")]
45 IAllowSelectorSettings WithHRef(string HRefFullOrPartial);
46 [Selector(Description = "Locate element using an XPath")]
47 IAllowSelectorSettings WithXPath(string xpath);
48 [Selector(Description = "Locate element searching visible text to find")]
49 IAllowSelectorSettings WithText(string textToFind);
50 [Selector(Description = "Locate element with the given value")]
51 IAllowSelectorSettings WithValue(string valueToFind);
52 [Selector(Description = "Locate element with the given name")]
53 IAllowSelectorSettings WithName(string nameToFind);
54 [Selector(Description = "Locate element with the given class name")]
55 IAllowSelectorSettings WithClassName(string nameToFind);
56 [Selector(Description = "Locate element using an AutomationID (application only)")]
57 IAllowSelectorSettings WithAutomationID(string nameToFind);
58 [Selector(Description = "Locate element loading the given image file to match")]
59 IAllowSelectorSettings WithImage(GPALFile imageToFindPath);
60 [Selector(Description = "Locate element loading the given image file to match")]
61 IAllowSelectorSettings WithImage(string dataURL);
62 [Selector(Description = "Locate element using the supplied image to match")]
63 IAllowSelectorSettings WithImage(Image imageToFine);
64 [Settings(Description = "Name of selector (used in messages and column names)")]
65 IAllowSelectorSettings WithSelectorName(string name);
66 [Settings(Description = "X offset to click inside element, also starting X location in element for drag-and-drop")]
67 IAllowSelectorSettings WithOffsetX(int offsetX);
68 [Settings(Description = "Y offset to click inside element, also starting X location in element for drag-and-drop")]
69 IAllowSelectorSettings WithOffsetY(int offsetY);
70 [Settings(Description = "X delta for drag-and-drop")]
71 IAllowSelectorSettings WithDeltaX(int offsetX);
72 [Settings(Description = "Y delta for drag-and-drop")]
73 IAllowSelectorSettings WithDeltaY(int offsetY);
74 [Settings(Description = "Scroll down a page to see if the selector comes into view [image/ocr]")]
75 IAllowSelectorSettings WithSearchForSelector(bool trueFalse = true);
76 IAllowSelectorSettings WithHardware { [Settings(Description = "Use hardware emulation to interact with this element [mouse/keyboard]")] get; }
77 IAllowSelectorSettings WithJavaScript { [Settings(Description = "Use javascript injection to interact with this element")] get; }
78 [Obsolete("This method is not preferred. Consider using WithJavaScript instead.", false)]
79 IAllowSelectorSettings WithJavascript { [Settings(Description = "Use javascript injection to interact with this element")] get; }
80 IAllowSelectorSettings WithSelenium { [Settings(Description = "Use selenium to interact with this element [default]")] get; }
81 [Settings(Description = "Smoothly move mouse to interact with this element [instead of jump to]. Implies .WithHardware")]
82 IAllowSelectorSettings WithSimulateMouse(bool moveWithArc = false);
83 [Settings(Description = "Stop the workflow if this selector is not found")]
84 IAllowSelectorSettings WithStopOnNotFound(bool trueFalse = false);
85 [Data(Description = "When retrieving data from the element, get data from the named attribute. [visible text is default]")]
86 IAllowSelectorSettings UseAttribute(string attributeName);
87 [Data(Description = "Located elements will match only if the text contains the supplied string")]
88
89 IAllowSelectorSettings ContainsAttribute(string text);
90 [Data(Description = "Located elements will match only if they have this named attribute")]
91 IAllowSelectorSettings MatchAttribute(string href);
92 [Data(Description = "Located elements will match only if the attribute name matches this regular expression")]
93 IAllowSelectorSettings MatchAttributeRegex(string href);
94 [Data(Description = "Located elements will match only if the text contains the supplied string")]
95
96 IAllowSelectorSettings ContainsHRef(string text);
97 [Data(Description = "Located elements will match only if they have this href")]
98 IAllowSelectorSettings MatchHRef(string href);
99 [Data(Description = "Located elements will match only if the href matches this regular expression")]
100 IAllowSelectorSettings MatchHRefRegex(string href);
101 [Data(Description = "Located elements will match only if the text contains the supplied string")]
102
103 IAllowSelectorSettings ContainsPlaceholder(string text);
104 [Data(Description = "Located elements will match only if the placeholder value matches the supplied string")]
105 IAllowSelectorSettings MatchPlaceholder(string placeholder);
106 [Data(Description = "Located elements will match only if the placebolder value matches this regular expression")]
107 IAllowSelectorSettings MatchPlaceholderRegex(string placeholder);
108 [Data(Description = "Located elements will match only if the text contains the supplied string")]
109
110 IAllowSelectorSettings ContainsSrc(string text);
111 [Data(Description = "Located elements will match only if the src matches the supplied string")]
112 IAllowSelectorSettings MatchSrc(string src);
113 [Data(Description = "Located elements will match only if the src matched the regular expression")]
114 IAllowSelectorSettings MatchSrcRegex(string src);
115 [Data(Description = "Located elements will match only if the text contains the supplied string")]
116
117 IAllowSelectorSettings ContainsText(string text);
118 [Data(Description = "Located elements will match only if the text matches the regular expression")]
119 IAllowSelectorSettings MatchText(string text);
120 [Data(Description = "Located elements will match only if the text matches the regular expression")]
121 IAllowSelectorSettings MatchTextRegex(string text);
122
123 [Data(Description = "Located elements will match only if the text contains the supplied string")]
124 IAllowSelectorSettings ContainsValue(string text);
125 [Data(Description = "Located elements will match only if the value matches the supplied string")]
126 IAllowSelectorSettings MatchValue(string value);
127 [Data(Description = "Located elements will match only if the value matches the regular expression")]
128 IAllowSelectorSettings MatchValueRegex(string value);
129 [Data(Description = "Custom Application UIAutomation Element matching method to examine and 'match' located elements using your algorithm.")]
130 IAllowSelectorSettings MatchFunction(Selector.appMatchingFunction AppMatchingFunction);
131 [Data(Description = "Custom browser webElement matching method to examine and 'match' located elements using your algorithm")]
132 IAllowSelectorSettings MatchFunction(Selector.webMatchingFunction WebMatchingFunction);
133 }
134 public interface IAllowCallBack
135 {
136 // return values
137 // 0 = not handled
138 // 1 = handled
139 // -1 = error
140 [Callback(Description = "Selector based callback if this selector is found")]
141 IAllowSelectorSettings CallIfFound(Browser.Browser.CallIfDelegate CallIfFound);
142 [Callback(Description = "Selector based callback if this selector is NOT found")]
143 IAllowSelectorSettings CallIfNotFound(Browser.Browser.CallIfDelegate CallIfNotFound);
144 // TODO: might we want to have an element called directly after it is filled in rather than the whole row? NOT YET
145 // IAllowAfterAnySelector CallAfterFillIn(Browser.Browser.CallAfterFillInDelegate CallAfterFillIn);
146 }
147
148 #endregion <Selector Settings>
149 #region <GPAL Interfaces>
150 [Interface(Description = "Global Settings")]
151 public interface IAllowGPALSettings
152 {
153 [GPALSettings(Description = "Print GPAL published information or exception messages to the supplied database. One column for each GPALEventArgs property. ")]
154 IAllowGPALSettings WithPublishToLogger(IGPALLogger logger);
155 IAllowGPALSettings RemoveLogger(IGPALLogger logger);
156 [GPALSettings(Description = "Print GPAL published information or exception messages to the output window in VisualStudio. [true (default)]")]
157 IAllowGPALSettings WithPublishToDebug(GPALEventType eventTypes = GPALEventType.INFO | GPALEventType.WARNING | GPALEventType.ERROR | GPALEventType.EXCEPTION | GPALEventType.NOTICE | GPALEventType.CAUTION | GPALEventType.FAILURE);
158 [GPALSettings(Description = "Indicate which published events to print to the console. [None (default)]")]
159 IAllowGPALSettings WithPublishToConsole(GPALEventType eventTypes = GPALEventType.INFO | GPALEventType.WARNING | GPALEventType.ERROR | GPALEventType.EXCEPTION | GPALEventType.NOTICE | GPALEventType.CAUTION | GPALEventType.FAILURE);
160 [GPALSettings(Description = "Print stack track when GPAL prints it's own published messages (PublishToConsole/PublishToDebug == true). [false (default)]")]
161 IAllowGPALSettings WithPublishStackTrace(bool trueFalse = true);
163 [GPALSettings(Description = "Intercharacter typing delay [0ms (default), no pacing]")]
164 IAllowGPALSettings WithTypingDelay(int delayInTicks = 0);
165 [GPALSettings(Description = "Handler to receive GPAL Exception events")]
166 IAllowGPALSettings WithExceptionHandler(EventHandler<GPALEventArgs> ExceptionEventHandler);
167 [GPALSettings(Description = "Handler to receive GPAL Information events")]
168 IAllowGPALSettings WithInformationHandler(EventHandler<GPALEventArgs> InformationEventHandler);
169 [GPALSettings(Description = "Image matching similarity percentage. [80 (default)]")]
170 IAllowGPALSettings WithImageMatchingPercentage(int matchPercent = 80);
171 [GPALSettings(Description = "Simulate moving the mouse for every action (implies .WithHardware). [false (default)]")]
172 IAllowGPALSettings WithSimulateMouseMovement(bool trueFalse = true);
173 [GPALSettings(Description = "Stop workflow if any selector is not found")]
174 IAllowGPALSettings WithStopOnNotFound(bool trueFalse = true);
175 [GPALSettings(Description = "Global location for browser drivers. [./ (default)(same dir as exe)]")]
176 IAllowGPALSettings WithDriverLocation([Directory(Description = "Global location for browser drivers. [./ (default)(same dir as exe)]")] string driverPath = "./");
177 IAllowGPALSettings WithTempDirectory([Directory(Description = "Where GPAL writes files it created itself and nobody asked to keep. [GPALfilesSafeToDelete beside the exe (default)]")] string tempPath);
178 [GPALSettings(Description = "Set the default location to store temporary profiles if WithDefaultDataDir is not used. default [C:\\profiles]. Also saved in GPAL.yaml that loads on startup.")]
179 IAllowGPALSettings WithTempProfileDirectory([Directory(Description = "Global location for temp profiles. [c:\\profiles (default)(saved in GPAL.yaml that is loaded on startup)]")] string tempProfileDirectory);
180 [GPALSettings(Description = "Substitue string when data cannot be retrieved for an element [##UNABLE TO GET## (default)]")]
181 IAllowGPALSettings WithDefaultErrorPlaceholder(string message = "##UNABLE TO GET##");
182 [GPALSettings(Description = "Automatically update the Chrome webdriver when running a GPAL application. Manually deploy first Chrome driver, tho.")]
183 IAllowGPALSettings WithAutomationEngine(AutomationEngine automationEngine = AutomationEngine.PuppeteerPort);
184 [GPALSettings(Description = "Automatically update the Chrome webdriver when running a GPAL application. Manually deploy first Chrome driver, tho.")]
185 IAllowGPALSettings WithAutoUpdateWebDriver(bool trueFalse = true);
186 [GPALSettings(Description = "Do not try alternate methods to interact with an element if an error occurs.")]
187 IAllowGPALSettings WithNoFallbackActions(bool trueFalse = true);
188 [GPALSettings(Description = "Ticks to wait for element to show up before continuing. Applies to every element in every workflow. Override in a Unit of Work with .WaitFor().")]
189 IAllowGPALSettings WithWaitFor(int waitForInTicks);
190 [GPALSettings(Description = "Global CallIfFound handler for all selectors in any Unit of Work")]
191 IAllowGPALSettings CallIfFound(Browser.Browser.CallIfDelegate CallIfFound);
192 [GPALSettings(Description = "Global CallIfFound handler for all selectors in any Unit of Work")]
193 IAllowGPALSettings CallIfNotFound(Browser.Browser.CallIfDelegate CallIfNotFound);
194 [GPALSettings(Description = "Global CallIfFound handler for all application selectors in any Unit of Work")]
195 IAllowGPALSettings AppCallIfFound(Application.Application.CallIfDelegate CallIfFound);
196 [GPALSettings(Description = "Global CallIfFound handler for all application selectors in any Unit of Work")]
197 IAllowGPALSettings AppCallIfNotFound(Application.Application.CallIfDelegate CallIfNotFound);
198 }
199 #endregion <GPAL Interfaces>
200 #region <Database Interfaces>
202 , IAllowParametersAndUsing, IAllowParametersAndInto, IAllowDatabaseExecute, IAllowToGPALObject<IGPALDatabase>, System.IDisposable
203 {
204 IGPALGrid<string> Tokens { get; }
205 }
206 public interface IAllowParameterLength { IAllowDatabaseSettings WithParameterLength(int columnLength); };
207 public interface IAllowColumnPrecision { IAllowPrecsionScaleAndSettings WithParameterPrecision(int columnPrecision); };
208 public interface IAllowColumnScale { IAllowPrecsionScaleAndSettings WithParameterScale(int columnScale); };
213 public interface IAllowDatabaseExecute
214 {
215 IAllowParametersAndActions Execute(out int rowCount);
217 IAllowParametersAndActions Execute(out List<int> rowCountsPerStatement);
218 }
219
225 {
232 IAllowDatabaseSettings GetRowCount(out List<int> rowCountsPerTable);
233 }
234 public interface IAllowDatabaseSettings : IAllowToGPALObject<IGPALDatabase>
235 {
236 IAllowDatabaseSettings WithConnectionString(string connectionString);
237 [Settings(Description = "How long a command may run before the provider gives up. [the provider's own default]")]
238 IAllowDatabaseSettings WithCommandTimeout(int timeoutInSeconds);
239 [Action(Description = "Close the connection and roll back a transaction still open on it. The database can be used again after.")]
241 IAllowDatabaseSettings WithUsername(string userName);
242 IAllowDatabaseSettings WithPassword(string password);
243 IAllowDatabaseSettings WithServerName(string serverName);
244 IAllowDatabaseSettings WithDatabaseName(string databaseName);
245 IAllowDatabaseSettings WithDatabaseType(DatabaseType databaseType);
246 IAllowDatabaseSettings WithTableName(string tableName);
247 IAllowDatabaseSettings WithSQLCommand(string sqlCommand);
248 IAllowDatabaseSettings WithStoredProcedure(string storedProcedure);
249 IAllowDatabaseSettings WithParameterName(string parameterName);
250 IAllowDatabaseSettings WithDatetimeParameter(string parameterName);
251 IAllowDatabaseSettings WithTimeParameter(string parameterName);
252 IAllowDatabaseSettings WithTimestampParameter(string parameterName);
253 IAllowPrecsionScaleAndSettings WithDecimalParameter(string parameterName);
254 IAllowDatabaseSettings WithFloatParameter(string parameterName);
255 IAllowDatabaseSettings WithImageParameter(string parameterName);
256 IAllowDatabaseSettings WithIntegerParameter(string parameterName);
257 IAllowDatabaseSettings WithMoneyParameter(string parameterName);
258 IAllowParameterLength WithVarCharParameter(string parameterName);
259 IAllowParameterLength WithNVarCharParameter(string parameterName);
260 IAllowParameterLength WithCharParameter(string parameterName);
261 IAllowParameterLength WithNCharParameter(string parameterName);
262 IAllowParameterLength WithTextParameter(string parameterName);
263 IAllowParameterLength WithNTextParameter(string parameterName);
264 IAllowDatabaseSettings WithTableParameter(string parameterName); // Structured columns
265 IAllowDatabaseSettings WithRowCount(int rowCount);
266 IAllowDatabaseSettings WithCreateAs(string createSQL);
267 IAllowDatabaseSettings WithReadAs(string selectSQL);
268 IAllowDatabaseSettings WithUpdateAs(string updateSQL);
269 IAllowDatabaseSettings WithDeleteAs(string deleteSQL);
270 IAllowDatabaseSettings WithErrorCallback(GPALDatabase.CallOnError CallOnError);
271 IAllowDatabaseSettings WithUDTTName(string typeName); // Structured column UDTT name
272 }
273 public interface IAllowDatabaseInto
274 {
275 IAllowDatabaseGridSettings SaveTo(out IGPALGrid<string> dataGrid);
276 IAllowDatabaseSettings SaveTo(out System.Data.DataTable dataTable);
277 IAllowDatabaseSettings SaveTo(out System.Data.DataSet dataSet);
278 IAllowDatabaseSettings SaveTo(out string value);
279 }
280 public interface IAllowDatabaseUsing
281 {
282 IAllowDatabaseExecute Using(IGPALGrid<string> dataGrid);
283 IAllowDatabaseExecute Using(System.Data.DataTable dataTable);
284 }
285 public interface IAllowParameters
286 {
287 IAllowParameters ClearParameters { get; }
288 IAllowParametersAndActions WithParameter(string parameter);
289 IAllowParametersAndActions WithParameterGrid(IGPALGrid<string> parameter);
290 }
292 {
293 IAllowParametersAndUsing Create { get; }
294 IAllowParametersAndInto Read { get; }
295 IAllowParametersAndUsing Update { get; }
296 IAllowParametersAndUsing Delete { get; }
297 IAllowParametersAndActions BeginTransaction { get; }
298 IAllowDatabaseActions Rollback { get; }
299 IAllowDatabaseActions Commit { get; }
300
301 }
310 public interface IAllowParametersAndInto
313 { }
314
315 #endregion <DatabaseInterfaces>
316 #region Credentials
318 {
319 IAllowCredentialsUsername WithService(CredentialServiceType serviceType);
320 }
321
322 public interface IAllowCredentialsUsername : IAllowToGPALObject<ICredentials>
323 {
324 IAllowCredentialsPassword WithUsername(string username);
325
326 // Alternative to WithUsername/WithPassword/etc: supply the login (master) credentials for the
327 // credential service itself (e.g. your Bitwarden/LastPass account), previously built with
328 // GPAL.CredentialsFor(CredentialServiceType.None).WithUsername(...).WithPassword(...).
329 IAllowCredentialsIntoCredentials WithCredentials(ICredentials credentials);
330
331 // Static API key - supply the key directly, from an env variable, or from an internal REST endpoint:
332 // GPAL.CredentialsFor(CredentialServiceType.StaticKey).WithServiceKey("sk-ant-...").ToGPALObject()
333 IAllowCredentialsIntoCredentials WithServiceKey(string key);
334
335 // Like WithServiceKey, but reads the key from an environment variable instead of a literal string:
336 // GPAL.CredentialsFor(CredentialServiceType.StaticKey).WithKeyFromEnv("ANTKEY").ToGPALObject()
337 IAllowCredentialsIntoCredentials WithKeyFromEnv(string envVariableName);
338
339 // Like WithServiceKey, but fetches the key via a GET request made with an already-configured RESTClient.
340 // Must be followed by .WithEndpoint(endpoint) to specify which endpoint returns the key:
341 // GPAL.CredentialsFor(CredentialServiceType.StaticKey).WithKeyFromApi(restClient).WithEndpoint("ANTKEY").ToGPALObject()
342 IAllowKeyFromApiEndpoint WithKeyFromApi(IRESTClient restClient);
343 }
344
346 {
347 IAllowCredentialsIntoCredentials WithEndpoint(string endpoint);
348 }
349
350 public interface IAllowCredentialsPassword : IAllowToGPALObject<ICredentials>
351 {
352 IAllowCredentialsServiceKeyWithCredentials WithPassword(string password);
353 }
354 public interface IAllowClientId
355 {
356 IAllowClientSecret WithClientId(string clientId);
357 IAllowCredentialsIntoCredentials WithServiceAccountKey(GPALFile serviceAccountKeyFile);
358 IAllowCredentialsIntoCredentials WithServiceAccountKey(string serviceAccountKey);
359 IAllowCredentialsIntoCredentials WithServiceAccountKey(GoogleServiceAccountKey serviceAccountKey);
360 }
361 public interface IAllowClientSecret
362 {
363 IAllowCredentialsIntoCredentials WithClientSecret(string clientSecret);
364 }
365 public interface IAllowCredentialsServiceKeyWithCredentials : IAllowClientId, IAllowToGPALObject<ICredentials>
366 {
367 // does this make sense? if loading form a db or file we can cast to this type and use it?
368 // IAllowCredentialsIntoCredentials WithCredentials(ICredentials credentials);
369 [Settings(Description = "How the site expects to be told who you are, which decides what a browser given this credential does with it")]
370 IAllowCredentialsServiceKeyWithCredentials WithWebAuth(WebAuthType webAuthType);
371 [Settings(Description = "A token the workflow already holds, presented according to the WebAuthType")]
372 IAllowCredentialsServiceKeyWithCredentials WithAccessToken(string accessToken);
373 [Settings(Description = "Where the OAuth redirect lands, which has to be the URI registered with the provider")]
374 IAllowCredentialsServiceKeyWithCredentials WithAuthRedirectUrl(string redirectUrl);
375 }
376
377 public interface IAllowCredentialsIntoCredentials : IAllowGetCredentials, IAllowToGPALObject<ICredentials>
378 {
379 IAllowCredentialsIntoCredentials GetCredentialsFor(string target);
380 IAllowCredentialsIntoCredentials WithDomain(string domain);
381 IAllowGetCredentials SaveTo(IGPALGrid<string> grid);
382 IAllowCredentialsIntoCredentials WithAuthCode(string authCode);
383 IAllowCredentialsIntoCredentials WithRefreshToken(string refreshToken);
384 IAllowCredentialsIntoCredentials WithScope(OAuthScope scope);
385 }
386
387 public interface IAllowGetCredentials
388 {
389 // No methods, placeholder for Into completion
390 void FetchAccessToken(out string accessToken);
391 }
392
397 #endregion Credentials
398 #region AI
399 public interface IAllowAICredentials
400 {
401 IAllowAITask WithCredentials(ICredentials credentials);
402 IAllowAITask WithCredentials(string staticApiKey);
403 }
404 public interface IAllowAIModel
405 {
406 // Accepts AIModel.ClaudeSonnet46 etc, or any freehand model ID string via implicit conversion.
407 IAllowAITask WithModel(AIModel model);
408 }
409 public interface IAllowAITaskConfig
410 {
411 IAllowAIConfig WithTask(AITask task);
412 IAllowAIConfig WithTaskConfig(ClassificationConfig config);
413 IAllowAIConfig WithClassificationType(AIClassificationType type);
414 IAllowAIConfig WithCustomClassification(ClassificationConfig config);
415 }
416 public interface IAllowAIOutput
417 {
418 IAllowAIExecution WithOutputTo(out IGPALGrid<string> target);
419 IAllowAIExecution WithOutputTo(object target);
420 }
421 public interface IAllowAIConfig : IAllowAITaskConfig, IAllowAIOutput, IAllowToGPALObject<IGPALAI>
422 {
423 IAllowAIOutput WithInputFrom(object source);
429 IAllowAIOutput WithLiveInputFrom(GPALForm.GPALInput input, int debounceMilliseconds = 500);
435 IAllowAIOutput WithLiveInputFrom(GPALForm.GPALTextArea textArea, int debounceMilliseconds = 500);
436 }
437 public interface IAllowAIExecution : IAllowToGPALObject<IGPALAI>
438 {
439 IAllowAIConfig CallAfterAIResponse(AIResponseDelegate callback);
440 IAllowAIConfig Execute();
441
442 // Reports "Sending request...", "Waiting for response...", "Response received", and any
443 // error encountered, to the given status strip while the AI task runs.
444 IAllowAIExecution WithStatusTo(GPALForm.GPALStatusStrip statusStrip);
445 }
446 public interface IAllowAITask : IAllowAICredentials, IAllowAIModel, IAllowToGPALObject<IGPALAI>
447 {
448 IAllowAIConfig WithTask(AITask task);
449 }
450 public interface IAllowAIProvider : IAllowToGPALObject<IGPALAI>
451 {
452 IAllowAITask WithProvider(AIProviderType provider);
453 }
457 #endregion AI
458 #region <Converter Interfaces>
459 public interface IGPALConverter : IAllowConverterInput, IAllowConverterSettings, IAllowConverterActions, IAllowToGPALObject<IGPALConverter>
461 {
462 // internal ConverterSettings ConverterSettings { get; set; }
463 }
464 public interface IAllowConverterInput : IAllowToGPALObject<IGPALConverter>
465 {
466 [Settings(Description = "Get input data to convert using the Database object")]
467 IAllowConverterSettingsAndActions WithInput(IGPALDatabase inputDatabase);
468 [Settings(Description = "Input data is contained in this GPALGrid")]
469 IAllowConverterSettingsAndActions WithInput(IGPALGrid<string> inputGrid);
470 [Settings(Description = "Input data is in this string")]
471 IAllowConverterSettingsAndActions WithInput(string inputData);
472 [Settings(Description = "Input data file (extension denotes type, override using WithInputType)")]
473 IAllowConverterSettingsAndActions WithInput(GPALFile inputFile);
474 [Settings(Description = "Input class, uses reflection to map to output format")]
475 IAllowConverterSettingsAndActions WithInput(dynamic inputClass);
476 [Settings(Description = "[Global] Register a custom struct type for the converter to recognize. Structs cannot be reliably determined. If you have a custom struct to convert, register it first.")]
477 IAllowConverterInput RegisterKnownStructType(Type knownStructType);
478 }
479 public interface IAllowConverterSettings : IAllowToGPALObject<IGPALConverter>
480 {
481 [Settings(Description = "Specify input data format")]
482 IAllowConverterSettingsAndActions WithInputType(DataFormat inDataType);
483 [Settings(Description = "Specify output data format")]
484 IAllowConverterSettingsAndActions WithOutputType(DataFormat outDataType);
485 [Settings(Description = "[Global] First line is a column name list (for flat files: csv, txt, prn)")]
486 IAllowConverterSettingsAndActions WithFirstLineHasColumnNames(bool firstLineHeaders = true);
487 [Settings(Description = "[Global] Ignore first line column name list (for flat files: csv, txt, prn)")]
488 IAllowConverterSettingsAndActions WithIgnoreFirstLineColumnNames(bool ignoreFirstLine = true);
489 [Settings(Description = "[Global] Each field is contained in quotes (for flat files: csv, txt, prn)")]
490 IAllowConverterSettingsAndActions WithColumnsEnclosedInQuotes(bool fieldsEnclosedInQuote = true);
491 [Settings(Description = "Column names for this conversion. Overrides the input source's own columns positionally; unsupplied columns are backfilled from the source.")]
492 IAllowConverterSettingsAndActions WithColumnNames(List<string> columnNames);
493 [Settings(Description = "Append a single column name for this conversion. Repeated calls build the list in order.")]
494 IAllowConverterSettingsAndActions WithColumnName(string parameterName);
495 }
496 public interface IAllowConverterActions
497 {
498 [Action(Description = "")]
499 IAllowConverterInputAndActions SaveTo(IGPALDatabase outputDatabase);
500 [Action(Description = "")]
501 IAllowConverterInputAndActions SaveTo(ref IGPALGrid<string> outputGrid);
502 [Action(Description = "")]
503 IAllowConverterInputAndActions SaveTo(string outputData);
504 [Action(Description = "")]
505 IAllowConverterInputAndActions AppendTo(GPALFile outputFile);
506 [Action(Description = "")]
507 IAllowConverterInputAndActions SaveTo(GPALFile outputFile);
508 [Action(Description = "")]
509 IAllowConverterInputAndActions SaveTo<T>(ref T outputClass);
510 [Action(Description = "")]
511 IAllowConverterInputAndActions RenderTo(IGPALDatabase outputDatabase);
512 [Action(Description = "")]
513 IAllowConverterInputAndActions RenderTo(string outputData);
514 [Action(Description = "")]
515 IAllowConverterInputAndActions RenderTo(GPALFile outputFile);
516 [Action(Description = "")]
517 IAllowConverterInputAndActions RenderToClass(out dynamic outputClass);
518 [Action(Description ="Pretty print the input to a new string.")]
519 IAllowConverterInputAndActions PrettyPrintTo(out string outputData);
520 }
521 public interface IAllowBase64Save
522 {
523 [Action("Save to a string the decoded Base64 content")]
524 IAllowBase64SaveOrInput SaveTo(string base64Output);
525 [Action("Save to a file based upon content type")]
526 IAllowBase64SaveOrInput SaveTo(GPALFile base64OutputFile);
527 }
528
538
539 #endregion <Converter Interfaces>
540 #region <File Interfaces>
542 {
543 string First { get; }
544 string Last { get; }
545 GPALFile Next { get; }
546 string Filename { get; }
547 List<string> Filenames { get; }
548 string DirectoryPart { get; }
549 string FilePart { get; }
550 List<string> DirectoryParts { get; }
551 List<string> FileParts { get; }
552 List<string> ReturnFilenames { get; }
553 string SourceUrl { get; }
554 int Count { get; }
555
556 }
557 internal interface IGPALFileInternal
558 {
559 internal GPALFileSettings FileSettings { get; set; }
560 internal List<IGPALGrid<string>> TokenList { get; set; }
561 internal List<string> FileData { get; set; }
562 internal List<char?> Delimiter { get; set; }
563 internal List<bool> FieldsEnclosedInQuotes { get; set; }
564 internal List<bool> FirstLineIsColumnNames { get; set; }
565 internal List<bool> IgnoreFirstLineColumnNames { get; set; }
566 internal bool UseOneHeaderForAllFiles { get; set; }
567 internal List<Dictionary<object, dynamic>> FileDictionary { get; set; }
568 internal List<IGPALGrid<string>> FileGrid { get; set; }
569 internal bool AlreadyTokenized { get; set; }
570 }
571 public interface IAllowFileSettings : IAllowFileName, IAllowToGPALObject<GPALFile>
572 {
573 [Settings(Description = "IF this file is delimited, the delimiter used.")]
574 IAllowFileSettings WithDelimiter(char delimiter);
575 [Settings(Description = "Add a column name to the column name list. (If no header in file or to override.)")]
576 IAllowFileSettings WithColumnName(string parameterName);
577 [Settings(Description = "Add column names to the column name list using the .WithDelimiter. Use this to add headers for multiple files.")]
578 IAllowFileSettings WithColumnNames(string columnNames);
579 [Settings(Description = "Add column names to the column name list using the supplied array. One column per element. Use this to add headers for multiple files.")]
580 IAllowFileSettings WithColumnNames(string[] columnNames);
581 [Settings(Description = "Each field is contained in quotes (for flat files: csv, txt, prn)")]
582 IAllowFileSettings WithColumnsEnclosedInQuotes(bool fieldsEnclosedInQuote = true);
583 [Settings(Description = "First line is a column name list (for flat files: csv, txt, prn)")]
584 IAllowFileSettings WithFirstLineIsColumnNames(bool firstLineIsHeader = true);
585 [Settings(Description = "Ignore first line header list")]
586 IAllowFileSettings WithIgnoreFirstLineColumnNames(bool ignoreFirstLine = true);
587 [Settings(Description = "Overwrite the file or generate a new filename. Overwrite is default.")]
588 IAllowFileSettings WithOverwriteFile(bool overwriteFile = false);
589 [Settings(Description = "One column list is defined, use it for all files in the file list.")]
590 IAllowFileSettings WithUseSameColumnNamesForAllFiles(bool useHeaderForAllFiles = true);
591 [Settings(Description = "Order in which files matched by a wildcard (e.g. *.csv) are added to the file list. Default is Name (alphabetical).")]
592 IAllowFileSettings WithFileSortOrder(Enums.FileSortOrder fileSortOrder);
593 [Settings(Description = "How Next builds a new unique filename (timestamp, date, or an incrementing counter). Default is CounterPadded.")]
594 IAllowFileSettings WithNextFilePattern(Enums.NextFilePattern nextFilePattern = Enums.NextFilePattern.CounterPadded);
595 }
596 public interface IAllowFileActions
597 {
598 [Action(Description = "Copy the defined GPALFile(s) to a destination file or directory")]
599 void CopyTo(string destination);
600 [Action(Description = "Move the defined GPALFile(s) to a destination file or directory")]
601 void MoveTo(string destination);
602 [Action(Description = "Delete the destination file or files (wildcard) or all in the directory (no filename)")]
603 void Delete(string destination);
604 [Action(Description = "Delete the defined GPALFile underlying file(s)")]
605 void Delete();
606 }
607 public interface IAllowFileName : IAllowToGPALObject<GPALFile>
608 {
609 [Settings(Description = "Add a filename to the GPALFile list. Actual output filenames added to end.")]
610 IAllowFileSettings WithFileName(string filename); // a wildcard pattern expands to the matching files; an http/https url is fetched to a local file and used from there
611 [Settings(Description = "A browser already holding the session a url needs. Set before .WithFileName. GPAL tries its own connection first and falls back to this browser, downloading in a new tab.")]
612 IAllowFileSettings WithBrowser(Browser.IBrowser browser);
613 }
614 #endregion <File Interfaces>
615 #region Grid
616 public interface IGPALGrid<T> : IAllowGridActions<T>, IEnumerable<List<T>> // , ICloneable
617 {
618 List<T> ToList();
619 [Settings(Description = "Enable duplicate-row detection for this grid when it is passed into GetGrid (off by default).")]
620 IGPALGrid<T> WithDedupeData(bool useDedupe = true);
621 }
622 public interface IAllowGridActions<T> : IAllowToGPALObject<IGPALGrid<T>>
623 {
624 IAllowGridActions<T> Add(IGPALGrid<T> grid);
625 IAllowGridActions<T> AddRow(List<T> row);
626 IAllowGridActions<T> AddColumn(List<T> column);
627 int Rows { get; }
628 int Columns { get; }
629 IAllowGridActions<T> AddCell(T value, int row, int column);
630 T GetCell(int row, int column);
631 IAllowGridActions<T> Clear();
632 IAllowGridActions<T> DeleteRow(RowPosition rowPosition = RowPosition.Last);
633 IAllowGridActions<T> InputFrom(GPALFile input);
634 IAllowGridActions<T> SaveTo(GPALFile output);
635 IAllowGridActions<T> InputFrom(IGPALDatabase input);
636 IAllowGridActions<T> SaveTo(IGPALDatabase output);
637 List<T> this[int index] { get; set; }
638 T this[int row, int column] { get; set; }
639 int Count();
640 bool Contains(T value);
641 public object Clone();
642 }
643 #endregion
644 #region <Email Interfaces>
646 {
647 // what a settings file holds, readable so a form can show what LoadSettings brought in
648 string SMTPServerName { get; }
649 int SMTPPortNum { get; }
650 string IMAPServerName { get; }
651 int IMAPPortNum { get; }
652 string POPServerName { get; }
653 int POPPortNum { get; }
654 string FromAddress { get; }
655 }
656 public interface IAllowEmailServerSettings : IAllowToGPALObject<IGPALMail>
657 {
658 [Settings(Description = "")]
659 IAllowEmailServerSettingsAndName WithIMAPServerName(string serverName);
660 [Settings(Description = "")]
661 IAllowEmailServerSettingsAndName WithIMAPPortNum(int portNum);
662 [Settings(Description = "")]
663 IAllowEmailServerSettingsAndName WithPOPServerName(string serverName);
664 [Settings(Description = "")]
665 IAllowEmailServerSettingsAndName WithPOPPortNum(int portNum);
666 [Settings(Description = "")]
667 IAllowEmailServerSettingsAndName WithSMTPServerName(string serverName);
668 [Settings(Description = "")]
669 IAllowEmailServerSettingsAndName WithSMTPPortNum(int portNum);
670 [Settings(Description = "The credential to authenticate with, whose username and password win over WithUserName and WithPassword")]
671 IAllowEmailServerSettingsAndName WithCredentials(ICredentials credentials);
672 [Settings(Description = "")]
673 IAllowEmailServerSettingsAndName WithUserName(string userName);
674 [Settings(Description = "")]
675 IAllowEmailServerSettingsAndName WithPassword(string password);
676 }
677 public interface IAllowEmailActions
678 {
679 [Action(Description = "")]
681 [Action(Description = "")]
683 [Action(Description = "Read the mail and hand back the messages")]
684 IAllowEmailEnvelopeAndActions Receive(out List<ReceivedEmail> receivedEmails);
685 [Action(Description = "Write every attachment on every message received into the given directory")]
686 IAllowEmailEnvelopeAndActions SaveTo(GPALFile directory);
687 [Action(Description = "Mark every message Receive collected as read on the server, in one connection. IMAP only.")]
688 IAllowEmailEnvelopeAndActions MarkAllAsRead();
689 [Action(Description = "Delete every message Receive collected from the server, in one connection. IMAP only.")]
691 [Action(Description = "")]
693 [Action(Description = "")]
694 IAllowEmailEnvelopeAndActions LoadSettings(GPALFile mailSettingsFile = null);
695 [Action(Description = "")]
696 IAllowEmailEnvelopeAndActions SaveSettings(GPALFile mailSettingsFile = null);
697 }
698 public interface IAllowEmailEnvelope
699 {
700 IAllowNameEnvelopeAndActions WithFromEmailAddress(string mailAddress);
701 [Settings(Description = "")]
702 IAllowNameEnvelopeAndActions WithToEmailAddress(string mailAddress);
703 [Settings(Description = "")]
704 IAllowNameEnvelopeAndActions WithCcEmailAddress(string mailAddress);
705 [Settings(Description = "")]
706 IAllowNameEnvelopeAndActions WithBccEmailAddress(string mailAddress);
707 [Settings(Description = "")]
708 IAllowNameEnvelopeAndActions WithToEmailAddress(string[] emailParts);
709 [Settings(Description = "")]
710 IAllowNameEnvelopeAndActions WithCcEmailAddress(string[] emailParts);
711 [Settings(Description = "")]
712 IAllowNameEnvelopeAndActions WithBccEmailAddress(string[] emailParts);
713 [Settings(Description = "")]
714 IAllowEmailEnvelopeAndActions WithAttachment(GPALFile attachmentFile);
715 [Settings(Description = "")]
716 IAllowEmailEnvelopeAndActions WithBody(string bodyText);
717 [Settings(Description = "")]
718 IAllowEmailEnvelopeAndActions WithSubject(string subject);
719 }
721 {
722 [Settings(Description = "Fetch only the messages the server still has as unread. Every message when false, which is the default.")]
723 IAllowEmailEnvelopeAndActions WithUnreadOnly(bool unreadOnly);
724 [Settings(Description = "The most messages one Receive may fetch, newest first. Every message by default.")]
725 IAllowEmailEnvelopeAndActions WithMaxMessages(int maxMessages);
726 }
727 public interface IAllowName { IAllowEmailEnvelopeAndActions WithName(string name); }
732 , IAllowToGPALObject<IGPALMail>
733 { }
737 , IAllowToGPALObject<IGPALMail>
738 { }
739 public interface IAllowEmailServerSettingsAndName : IAllowToGPALObject<IGPALMail>
743 { }
744 #endregion <Email Interfaces>
745 #region Logger
746 public interface IGPALLogger : IAllowLoggingSettings, IAllowLoggingAndSetting, IAllowToGPALObject<IGPALLogger>
747 {
748 // where the last entry was written, which is the logger's answer rather than the workflow's guess
749 string LogDirectory { get; }
750 string LogFilename { get; }
751 string LogFullPath { get; }
752 }
753 public interface IAllowLoggingSettings : IAllowToGPALObject<IGPALLogger>
754 {
755 [Settings(Description = "")]
756 IAllowLoggingSettings WithDatabase(GPALDatabase database);
757 [Settings(Description = "")]
758 IAllowLoggingSettings WithRootDirectory(string path);
759 [Settings(Description = "")]
760 IAllowLoggingSettings WithDirectoryStructure(DirectoryStructure type);
761 [Settings(Description = "")]
762 IAllowLoggingSettings WithFilename(string name);
763 [Settings(Description = "")]
764 IAllowLoggingSettings WithFilenamePattern(FilenamePattern pattern);
765 [Settings(Description = "Which event types this logger writes, published or called directly. Defaults to all")]
766 IAllowLoggingAndSetting WithLogEventTypes(GPALEventType logEventTypes);
767 [Settings(Description = "")]
768 IAllowLoggingAndSetting WithLogType(Enums.LogType logType);
769 [Settings(Description = "")]
770 IAllowLoggingAndSetting WithDelimiter(char delimiter);
771 [Settings(Description = "")]
772 IAllowLoggingAndSetting WithLoggingFormat(LogDateFormat logDateFormat);
773 [Settings(Description = "")]
774 IAllowLoggingAndSetting WithLogDateAsAttribute(bool logDateAsAttribute);
775 }
776 // no Log here any more: an entry is raised by publishing an event, and a logger is where events land
779 #endregion Logger
780 #region Excel
781 // Core operations
782 public interface IAllowExcelCore
783 {
784 IAllowExcelOperations SaveTo(GPALFile gpalFile);
785 IAllowExcelOperations SaveTo(IGPALGrid<string> grid);
786 IAllowExcelOperations SaveTo(int sheetIndex);
787 IAllowExcelOperations SaveTo(string sheetName);
788 void Close(bool saveOnClose);
789 }
790
791 // File selection state
793 {
794 IAllowExcelSheetSelection WithFile(GPALFile gpalFile);
795 }
796
797 // Sheet selection state
798 public interface IAllowExcelSheetSelection : IAllowExcelCore, IAllowToGPALObject<IGPALExcel>
799 {
800 IAllowExcelOperations WithSheet(int sheetIndex);
801 IAllowExcelOperations WithSheet(string sheetName);
802 }
803
804 // Comparison results state
806 {
807 IAllowExcelOperations CompareToGrid(IGPALGrid<string> grid);
808 IAllowExcelOperations CompareToFile(GPALFile gpalFile);
809 IAllowExcelOperations CompareToRange(string range);
810 }
811
812 // General operations state
814 {
815 IAllowExcelOperations WithRange(string range);
816 IAllowExcelOperations WriteRange(string range);
817 IAllowExcelOperations ClearRanges();
818 IAllowExcelCellSettings WithCell(string cell);
819 IAllowExcelSearchAndReplaceSettings WithSearchValue(string value);
820 IAllowExcelOperations WithColumn(string column);
821 IAllowExcelOperations WithRowNumber(int rowNumber);
822 IAllowExcelOperations CalculateSum(out string result);
823 IAllowExcelOperations CalculateCount(out string result);
824 IAllowExcelOperations GetCompareResults(out IGPALGrid<string> results);
825 }
826
827 // Cell operations state
829 {
830 IAllowExcelCellSettings WithInsertPosition(int position);
831 IAllowExcelCellSettings WithInsertSeparator(string separator);
832 IAllowExcelOperations InsertValue(string value);
833 IAllowExcelOperations SetValue(string value);
834 IAllowExcelOperations AppendValue(string value);
835 IAllowExcelOperations PrependValue(string value);
836 }
837
838 // Search and replace settings state
840 {
841 IAllowExcelOperations ReplaceWith(string value);
842 }
843
844 // Unified interface
848 #endregion Excel
849 #region Launcher
850 // written by Grok
851 public interface IAllowExecutableSetup : IAllowToGPALObject<Launcher>
852 {
853 IAllowExecutableSetup WithExecutable(string executable);
854 IAllowExecutableSetup WithArgument(string argument);
855 IAllowExecutableSetup WithName(string argument);
857 }
858
859 // Post-launch: Running state
860 public interface IAllowRunningExecutable : IAllowToGPALObject<Launcher>, IAllowWaitingExecutable
861 {
862 IAllowRunningExecutable RedirectOutput(Action<string> outputHandler);
863 IAllowRunningExecutable RedirectError(Action<string> errorHandler);
864 IAllowRunningExecutable SetWorkingDirectory(string directory);
865 IAllowRunningExecutable SetEnvironmentVariable(string name, string value);
866 IAllowRunningExecutable IsRunning();
867 IAllowWaitingExecutable WaitForExit(int milliseconds);
868 }
869
870 // Post-wait/exit: Limited to termination
871 public interface IAllowWaitingExecutable
872 {
873 void Kill();
874 void KillTree();
875 }
876 #endregion Launcher
877 #region REST
878 // generated by grok
879 public interface IAllowRESTEndpoint
880 {
881 IAllowRESTEndpointDetails WithAPIBase(string url);
882 IAllowRESTEndpointDetails WithAPIBase(string url, TimeSpan httpTimeout);
883 IAllowRESTEndpointDetails LoadOpenAPIMap(string yamlOrUrl);
884 IAllowRESTEndpointDetails LoadOpenAPIMap(GPALFile openSpiMapFile);
885 }
886
887 public interface IAllowRESTEndpointDetails : IAllowRESTExecution, IAllowRESTParameters, IAllowToGPALObject<IRESTClient>
888 {
889 IAllowRESTParametersOrExecution WithEndpoint(string endpoint);
890 IAllowRESTParametersOrExecution WithEndpoint(ApiEndpoint endpoint);
891 IAllowRESTParametersOrExecution WithResultName(string name);
892 IAllowRESTEndpointDetails WithName(string name);
893 IAllowRESTEndpointDetails ListOpenAPIEndPoints();
894 }
895
897 {
898 IAllowRESTParametersOrExecution WithUrl(string url);
899 IAllowRESTParametersOrExecution WithUrlFromResult(int resultIndex);
900 IAllowRESTParametersOrExecution WithUrlFromResult(string name);
901 IAllowRESTParametersOrExecution WithTabId(int tabId);
902 IAllowRESTParametersOrExecution WithTabIdFromResult(int resultIndex);
903 IAllowRESTParametersOrExecution WithTabIdFromResult(string name);
904 IAllowRESTParametersOrExecution WithWindowId(int windowId);
905 IAllowRESTParametersOrExecution WithWindowIdFromResult(int resultIndex);
906 IAllowRESTParametersOrExecution WithWindowIdFromResult(string name);
907 IAllowRESTStorageOptions WithStorageType(WebsiteStorageType storageType);
908 IAllowRESTParametersOrExecution WithKey(string key);
909 IAllowRESTParametersOrExecution WithKeyFromResult(int resultIndex);
910 IAllowRESTParametersOrExecution WithKeyFromResult(string name);
911 IAllowRESTParametersOrExecution WithCss(string css);
912 IAllowRESTParametersOrExecution WithCssFromResult(int resultIndex);
913 IAllowRESTParametersOrExecution WithCssFromResult(string name);
914 IAllowRESTParametersOrExecution WithElement(IGPALElement gPALElement);
915 IAllowRESTParametersOrExecution WithXPath(string xpath);
916 IAllowRESTParametersOrExecution WithXPathFromResult(int resultIndex);
917 IAllowRESTParametersOrExecution WithXPathFromResult(string name);
918 IAllowRESTParametersOrExecution WithPixels(int pixels);
919 IAllowRESTParametersOrExecution WithPixelsFromResult(int resultIndex);
920 IAllowRESTParametersOrExecution WithPixelsFromResult(string name);
921 IAllowRESTParametersOrExecution WithReferrer(string referrer);
922 IAllowRESTParametersOrExecution WithReferrerFromResult(int resultIndex);
923 IAllowRESTParametersOrExecution WithReferrerFromResult(string name);
924 IAllowRESTExecution WithText(string text);
925 IAllowRESTExecution WithTextFromResult(int resultIndex);
926 IAllowRESTExecution WithTextFromResult(string name);
928 IAllowRESTParametersOrExecution SaveResultsTo(GPALFile file);
929 IAllowRESTParametersOrExecution WithElementId(string elementId);
930 IAllowRESTParametersOrExecution WithElementIdFromResult(int resultIndex);
931 IAllowRESTParametersOrExecution WithElementIdFromResult(string name);
932 IAllowRESTExecution SetValueFrom(string destSelector);
933 IAllowRESTScrollElement WithHPixelsFromResult(int resultIndex);
934 IAllowRESTScrollElement WithHPixelsFromResult(string name);
935 IAllowRESTScrollElement WithVPixelsFromResult(int resultIndex);
936 IAllowRESTScrollElement WithVPixelsFromResult(string name);
937 IAllowRESTExecution WithDeviceName(string deviceNameOrId);
938
939 }
940 public interface IAllowRESTMethod
941 {
942 IAllowRESTExecution WithHttpMethod(string method);
943 }
944
945 public interface IAllowRangeValue
946 {
947 IAllowRESTExecution WithRangeValue(int rangeValue);
948 }
950 {
951 string Execute(bool publishEvent = true);
952 T Execute<T>(bool publishEvent = true);
953 IRESTClient AndThen(bool publishEvent = true);
954 IRESTClient AndThen<T>(bool publishEvent = true);
955 Task<string> ExecuteAsync(bool publishEvent = true);
956 Task<T> ExecuteAsync<T>(bool publishEvent = true);
957 ResultCollection GetExecutionResults();
958 IAllowRESTExecution WithHeader(string name, string value);
959 }
960
962 {
963 IAllowRESTParametersOrExecution WithParameters(params object[] parameters);
964 IAllowRESTParametersOrExecution WithParameters(object parameters);
965 IAllowRESTParametersOrExecution WithParametersFromResult(int resultIndex);
966 IAllowRESTParametersOrExecution WithParametersFromResult(string name);
967 IAllowRESTParametersOrExecution WithEncoding(Enums.ContentEncoding encoding);
968 }
969
970 public interface IAllowRESTWorkflow
971 {
972 IAllowRESTWorkflow WithWorkflow(Action<RESTClient> workflow);
973 IAllowRESTParametersOrExecution While(Func<bool> condition);
974 IAllowRESTParametersOrExecution Until(Func<bool> condition);
975 }
976
978 {
979 IAllowCheckNetworkIdleOrExecution WithTimeoutMs(int timeoutMs);
980 IAllowCheckNetworkIdleOrExecution WithPruneMs(int pruneMs);
981 IAllowCheckNetworkIdleOrExecution WithMaxConnections(int maxConnections);
982 }
983
985 {
986 IAllowRESTScrollElement WithHPixels(int hPixels);
987 IAllowRESTScrollElement WithVPixels(int vPixels);
988 }
989
991 {
992 IAllowRESTDragAndDrop WithDeltaX(int deltaX);
993 IAllowRESTDragAndDrop WithDeltaY(int deltaY);
994 IAllowRESTDragAndDrop WithOffsetX(int offsetX);
995 IAllowRESTDragAndDrop WithOffsetY(int offsetY);
996 }
997
999 {
1000 IAllowRESTAttribute WithAttribute(string attribute);
1001 IAllowRESTAttribute WithValue(string value);
1002 }
1003
1004 public interface IAllowRESTInputText
1005 {
1006 IAllowRESTExecution WithText(string text);
1007 }
1008
1009 public interface IAllowSelectOptions
1010 {
1011 IAllowRESTExecution WithSelectValue(string value);
1012 IAllowRESTExecution WithSelectIndex(int index);
1013 }
1015 {
1016 IAllowRESTExecution WithDownloadFile(string downloadPath);
1017 }
1019 {
1020 IAllowRESTExecution WithUploadFile(string uploadFilenameAndPath);
1021 IAllowRESTExecution WithUploadFiles(GPALFile uploadFilenamesAndPaths);
1022 }
1023
1025 {
1026 IAllowRESTCaptureOptions WithCallFilter(string urlFragment);
1027 IAllowRESTCaptureOptions WithClearCalls(bool clear = true);
1028 }
1029
1031 {
1032 IAllowRESTStorageOptions WithStorageDomain(string domain);
1033 IAllowRESTStorageOptions WithStoragePath(string path);
1034 IAllowRESTStorageOptions WithStorageKey(string key);
1035 IAllowRESTStorageOptions WithStorageStoreName(string storeName);
1036 IAllowRESTStorageOptions WithData(string data);
1037 IAllowRESTStorageOptions WithDeleteAcrossOrigins(bool trueFalse);
1038 }
1039
1040 public interface IAllowRestMethods
1041 {
1042 // Single-parameter methods with direct Execute
1043 IAllowRESTExecution Back();
1044 IAllowRESTExecution CaptureVisibleTab(ImageFormat imageFormat = ImageFormat.JPEG);
1045 IAllowRESTExecution CloseTab(GPALUrl url = null);
1046 IAllowRESTExecution CloseTab(int tabId);
1047 IAllowRESTExecution CloseWindow(GPALUrl url = null);
1048 IAllowRESTExecution CloseBrowser();
1049 IAllowRESTExecution CloseWindow(int tabId);
1050 IAllowRESTStorageOptions DeleteStorage(WebsiteStorageType storageType);
1051 IAllowRESTParameters ExecuteJavaScript(string script); // Removed params version as noted
1052 IAllowRESTParameters InjectScript(string script);
1053 IAllowRESTParameters ClearInjectedScripts();
1054 IAllowRESTInputText FillInAppend(string elementId);
1055 IAllowRESTInputText FillInInsert(string elementId);
1056 IAllowRESTInputText FillInOverwrite(string elementId);
1057 IAllowRESTExecution Forward();
1058 IAllowRESTExecution FullScreen();
1059 IAllowRESTExecution GetReadyStatus();
1060 IAllowRESTExecution CheckNetworkIdle(int maxConnections = 0);
1061 IAllowRESTExecution GetShadowRoot(string css);
1062 IAllowRESTStorageOptions GetStorage(WebsiteStorageType storageType);
1063 IAllowRESTExecution GetCurrentUrl();
1064 IAllowRESTExecution GetCurrentWindow();
1065 IAllowRESTExecution GetOptions(string elementId);
1066 IAllowRESTExecution GetLanguages();
1067 IAllowRESTCaptureOptions CaptureCalls(bool capture = true);
1068 IAllowRESTExecution GetCapturedCalls();
1069 IAllowRESTExecution GetUserAgent();
1070 IAllowRESTExecution GoTo(GPALUrl url);
1071 IAllowRESTExecution GoToTab(GPALUrl url);
1072 IAllowRESTExecution GoToTab(int tabId);
1073 IAllowRESTExecution GoToWindow(GPALUrl url);
1074 IAllowRESTExecution GoToWindow(int tabId);
1075 IAllowRESTExecution Maximize();
1076 IAllowRESTExecution Minimize();
1077 IAllowRESTExecution MoveTo(string elementId);
1078 IAllowRESTExecution NewTab(GPALUrl url = null);
1079 IAllowRESTExecution NextTab();
1080 IAllowRESTExecution TabCount();
1081 IAllowRESTExecution NextWindow();
1082 IAllowRESTExecution Normal();
1083 IAllowRESTExecution OpenWindow(GPALUrl url = null);
1084 IAllowRESTExecution OverrideReferrer(string referrer);
1085 IAllowRESTExecution PageDown(int pagesToScroll = 1);
1086 IAllowRESTExecution PageEnd();
1087 IAllowRESTExecution PageTop();
1088 IAllowRESTExecution PageUp(int pagesToScroll = 1);
1089 IAllowRESTExecution PressModifierKey(ModifierKeys modifierKeys);
1090 IAllowRESTExecution PreviousTab();
1091 IAllowRESTExecution PreviousWindow();
1092 IAllowRESTExecution Refresh();
1093 IAllowRESTExecution ReleaseModifierKey(ModifierKeys modifierKeys);
1094 IAllowRESTExecution Restore();
1095 IAllowRESTExecution ScrollWindowByHorizontal(int pixels);
1096 IAllowRESTExecution ScrollWindowByVertical(int pixels);
1102 IAllowRESTExecution SendString(string text, int delayMs = 0);
1103 IAllowRESTExecution SendKey(byte vkcode);
1104 IAllowRangeValue SetRange(string elementId);
1105 IAllowRESTStorageOptions SetStorage(WebsiteStorageType storageType);
1106 IAllowRESTExecution SetUserAgent(string userAgent);
1107 IAllowRESTExecution StealthOverrideReferrer();
1108 IAllowRESTExecution SubmitForm(string elementId);
1109 IAllowRESTExecution SwitchToDefaultContent();
1110 IAllowRESTExecution SwitchToElement(string elementId); // same as switch to iframe
1111 IAllowRESTExecution SwitchToFrame(string elementId); // same as switch to element
1112 IAllowRESTExecution SwitchToShadowRoot(string elementId);
1113 IAllowRESTExecution GetWorkflow();
1114 IAllowRESTExecution GetSettings();
1115 IAllowRESTExecution GetGpalSettings();
1116 IAllowRESTExecution GetBrowserSettings();
1117 IAllowRESTExecution FireChangeEvent(string elementId);
1118 IAllowRESTExecution Focus(string elementId);
1119 IAllowRESTExecution GetBoundingClientRect(string elementId);
1120 IAllowRESTExecution ElementFromPoint(string elementId, int x, int y);
1121 IAllowRESTExecution GetElementAttributeHash(string elementId);
1122 IAllowRESTExecution GetPageSource();
1123 IAllowRESTExecution GetParentNode(string elementId);
1124 IAllowRESTExecution GetContentAndCss(string selector);
1125 IAllowRESTExecution GetCssAttributes(string selector);
1126 IAllowRESTExecution GetDomAttributes(string selector);
1127 IAllowRESTExecution GetDomProperties(string selector);
1128 IAllowRESTExecution GetWindowRectangle();
1129 IAllowRESTExecution HideElement(string elementId);
1130 IAllowRESTExecution IsClickable(string elementId);
1131 IAllowRESTExecution IsDisplayed(string elementId);
1132 IAllowRESTExecution IsEnabled(string elementId);
1133 IAllowRESTExecution IsEndOfPage();
1134 IAllowRESTExecution IsVisibleInViewport(string elementId);
1135 IAllowRESTExecution LeftClick(string elementId);
1136 IAllowRESTWithDownloadFilename RightClickAndDownload(string elementId);
1137 IAllowRESTWithDownloadFilename LeftClickAndDownload(string elementId);
1138 IAllowRESTExecution SetDownloadFilename(string downloadPath);
1139 IAllowRESTWithUploadFilename LeftClickAndUpload(string elementId);
1140 IAllowRESTExecution LeftDoubleClick(string elementId);
1141 IAllowRESTExecution MiddleClick(string elementId);
1142 IAllowRESTExecution RightClick(string elementId);
1143 IAllowRESTExecution ScrollIntoView(string elementId);
1144 IAllowRESTExecution WindowInnerHeight();
1145 IAllowRESTExecution WindowInnerWidth();
1146 IAllowRESTExecution WindowOuterHeight();
1147 IAllowRESTExecution WindowOuterWidth();
1148 IAllowRESTParametersOrExecution Fetch(string url);
1149 IAllowRESTParametersOrExecution WithVerb(string method);
1150 IAllowRESTParametersOrExecution WithBody(string body);
1151 IAllowRESTParametersOrExecution WithContentType(string contentType);
1152 IAllowRESTParametersOrExecution WithHeaders(string[] headers);
1153 IAllowRESTParametersOrExecution WithBytes(bool bytes);
1154 IAllowRESTExecution WindowPageOffsetX();
1155 IAllowRESTExecution WindowPageOffsetY();
1156 IAllowRESTExecution WindowScreenLeft();
1157 IAllowRESTExecution WindowScreenTop();
1158 IAllowRESTExecution Hover(string elementId);
1159 IAllowRESTExecution EvaluatePersistent(string xpath);
1160 IAllowRESTExecution EvaluateAllPersistent(string xpath);
1161 IAllowRESTExecution QueryPersistentSelector(string css);
1162 IAllowRESTExecution QueryPersistentSelectors(string css);
1163 IAllowRESTExecution Evaluate(string xpath);
1164 IAllowRESTExecution EvaluateAll(string xpath);
1165 IAllowRESTExecution QuerySelector(string css);
1166 IAllowRESTExecution QuerySelectors(string css);
1167 IAllowRESTExecution ScrollWindow(int hPixels, int vPixels);
1168 IAllowRESTExecution TopBrowser();
1169 IAllowRESTExecution ClearReferrer();
1170
1171
1172 // Multi-parameter methods with fluent steps
1173 IAllowSelectOptions SelectClick(string elementId);
1174 IAllowRESTAttribute SetAttribute(string elementId);
1175 IAllowRESTScrollElement ScrollElement(string elementId);
1176 IAllowRESTExecution ScrollElement(int hPixels, int vPixels);
1177 IAllowRESTDragAndDrop DragAndDrop(string elementId);
1178 IAllowRESTAttribute GetAttribute(string elementId); // Returns IAllowRESTAttribute, skips WithValue
1179 }
1180
1187 #endregion REST
1188 #region GPALElement
1189 public interface IGPALElement
1190 {
1191 // Complete element contract. These were previously reached only by inheriting Selenium's
1192 // IWebElement, which leaked a Selenium reference onto every consumer. GPALElement implements
1193 // all of them natively, and every signature uses GPAL/BCL types only, never a Selenium type.
1194 // Consumers program against IGPALElement and cast to GPALElement only for the plumbing
1195 // (WrappedDriver, WebElement, node ids, ToDictionary, Dispose).
1196 string TagName { get; }
1197 string Text { get; }
1198 bool Enabled { get; }
1199 bool Selected { get; }
1200 bool Displayed { get; }
1201 Point Location { get; }
1202 Size Size { get; }
1203 string GetAttribute(string attributeName);
1204 void SetAttribute(string attributeName, string value);
1205 string GetCssValue(string propertyName);
1206 string GetDomAttribute(string attributeName);
1207 string GetDomProperty(string propertyName);
1208 void Click();
1209 void Click(ModifierKeys modifierKeys);
1210 void MiddleClick(ModifierKeys modifierKeys = ModifierKeys.NONE);
1211 void Clear();
1212 void SendKeys(string text);
1213 void Submit();
1214 void Hide();
1215 Dictionary<string, object> Attributes { get; }
1216 Dictionary<string, object> CssAttributes { get; }
1217 Dictionary<string, object> DomAttributes { get; }
1218 Dictionary<string, object> DomProperties{ get; }
1219 string AttributeName { get; }
1220 string Href { get; }
1221 string Src { get; }
1222 string Value { get; }
1223 string Placeholder { get; }
1224 string Xpath { get; }
1225 XPathInfo[] Xpaths { get; }
1226 string Css { get; }
1227 string FullXPath { get; }
1228 //string SelectorName { get; set; }
1229 //int OffsetX { get; set; }
1230 //int OffsetY { get; set; }
1231 //int DeltaX { get; set; }
1232 //int DeltaY { get; set; }
1233 //string ImageData { get; set; }
1234 ClientRectangle BoundingRect { get; }
1235 string PageURL { get; }
1236 GPALElement ShadowRoot { get; }
1237 dynamic WebElement { get; }
1238 bool IsClickable(bool publishEvent = true);
1239 bool IsDisabled();
1240 bool IsEnabled();
1241
1242 }
1243 #endregion GPALElement
1244 #region Cryptography
1245 public interface IAllowCryptoGenerateIV
1246 {
1247 IAllowCryptoConfig GenerateIV(out byte[] iv);
1248 }
1249
1250 public interface IAllowCryptoInput
1251 {
1252 IAllowCryptoAction WithInputData(byte[] data);
1253 }
1254
1255 public interface IAllowCryptoEncrypt
1256 {
1257 IAllowCryptoConfig Encrypt(out byte[] encryptedData);
1258 }
1259
1260 public interface IAllowCryptoDecrypt
1261 {
1262 IAllowCryptoConfig Decrypt(out string decryptedValue);
1263 }
1264
1265 public interface IAllowCryptoSign
1266 {
1267 IAllowCryptoConfig Sign(out byte[] signature);
1268 }
1269
1270 public interface IAllowCryptoVerify
1271 {
1272 IAllowCryptoConfig Verify(out bool isValid);
1273 }
1274
1275 public interface IAllowCryptoHash
1276 {
1277 IAllowCryptoConfig Hash(out byte[] hash);
1278 }
1279
1281 {
1282 IAllowCryptoConfig GenerateKey(out byte[] key);
1283 }
1284
1285 public interface IAllowCryptoConfig :
1290 {
1291 IAllowCryptoConfig WithAlgorithm(CryptoAlgorithm alg);
1292 IAllowCryptoConfig WithKey(byte[] key);
1293 IAllowCryptoConfig WithIV(byte[] iv);
1294 IAllowCryptoConfig WithMode(CryptoMode mode);
1295 IAllowCryptoConfig WithPadding(CryptoPadding padding);
1296 IAllowCryptoConfig WithSalt(byte[] salt);
1297 IAllowCryptoConfig WithIterationCount(int count);
1298 IAllowCryptoConfig WithSignature(byte[] signature);
1299 }
1300
1301 public interface IAllowCryptoKeyGenInput :
1304 {
1305 }
1306
1317
1318 public interface ICryptography : IAllowCryptoAction, IAllowCryptoKeyGenInput, IAllowCryptoConfig, IAllowToGPALObject<ICryptography>
1319 {
1320 }
1321 #endregion Cryptography
1322 #region Gherkin
1323 public interface IAllowGiven
1324 {
1325 IAllowWhen Given(Action step);
1326 IAllowWhen Given<T1>(Action<T1> step, T1 arg1);
1327 IAllowWhen Given<T1, T2>(Action<T1, T2> step, T1 arg1, T2 arg2);
1328 IAllowWhen Given<T1, T2, T3>(Action<T1, T2, T3> step, T1 arg1, T2 arg2, T3 arg3);
1329 }
1330
1331 public interface IAllowWhen
1332 {
1333 IAllowAnd When(Action step);
1334 IAllowAnd When<T1>(Action<T1> step, T1 arg1);
1335 IAllowAnd When<T1, T2>(Action<T1, T2> step, T1 arg1, T2 arg2);
1336 IAllowAnd When<T1, T2, T3>(Action<T1, T2, T3> step, T1 arg1, T2 arg2, T3 arg3);
1337 }
1338
1339 public interface IAllowAnd
1340 {
1341 IAllowThen And(Action step);
1342 IAllowThen And<T1>(Action<T1> step, T1 arg1);
1343 IAllowThen And<T1, T2>(Action<T1, T2> step, T1 arg1, T2 arg2);
1344 IAllowThen And<T1, T2, T3>(Action<T1, T2, T3> step, T1 arg1, T2 arg2, T3 arg3);
1345 }
1346
1347 public interface IAllowThen : IAllowAnd
1348 {
1349 IAllowThen Then(Action step);
1350 IAllowThen Then<T1>(Action<T1> step, T1 arg1);
1351 IAllowThen Then<T1, T2>(Action<T1, T2> step, T1 arg1, T2 arg2);
1352 IAllowThen Then<T1, T2, T3>(Action<T1, T2, T3> step, T1 arg1, T2 arg2, T3 arg3);
1353 }
1354 #endregion Gherkin
1355 #region <Request Settings>
1356 [Interface(Description = "Describe an API request for .Fetch to issue from inside the page")]
1357 public interface IAllowRequestSettings : IAllowToGPALObject<GPALRequest>
1358 {
1359 [Settings(Description = "Replace a query parameter's value with the next numbered token")]
1360 IAllowRequestSettings WithTokenFor(string parameterName);
1361 [Settings(Description = "Path or full URL to request. A path rides the origin the browser is already on")]
1362 IAllowRequestSettings WithPath(string path);
1363 [Settings(Description = "HTTP method, for example GET, POST, PUT, DELETE. [GET (default)]")]
1364 IAllowRequestSettings WithHttpMethod(Enums.HttpVerb method);
1365 [Settings(Description = "Add a query parameter written as \"name=value\". Call once per parameter")]
1366 IAllowRequestSettings WithParameter(string nameValue);
1367 [Settings(Description = "Add a request header written as \"Name: value\". Call once per header")]
1368 IAllowRequestSettings WithHeader(string nameValue);
1369 [Settings(Description = "Body to send, used as-is")]
1370 IAllowRequestSettings WithBody(string body);
1371 [Settings(Description = "Content type of the body. [application/json (default)]")]
1372 IAllowRequestSettings WithContentType(Enums.ContentType contentType);
1373 [Settings(Description = "What this API calls its first page, which the page token counts on from. [0 (default)]")]
1374 IAllowRequestSettings WithFirstPage(int firstPage);
1375 [Settings(Description = "The marker replaced with the page number, wherever it appears in the path, a parameter value, a header value or the body. Give it a numbered token to hand GPAL one of the token positions. [{page} (default)]")]
1376 IAllowRequestSettings WithPageToken(string token = "{page}");
1377 [Settings(Description = "Handler called after each row of tokens is fetched, with that row's pages. Return -1 to stop")]
1378 IAllowRequestSettings CallAfterFetch(Browser.Browser.CallAfterFetchDelegate callAfterFetch);
1379 [Settings(Description = "Name of request (used in messages and errors)")]
1380 IAllowToGPALObject<GPALRequest> WithName(string name);
1381 }
1382 #endregion <Request Settings>
1383 public interface IAllowToGPALObject<TResult>
1384 {
1385 [Fluent(Description = "Ends a declaration or workflow, returning a GPAL object which can be assigned. Use instead of an explicit cast. [ Selector mySel = GPAL.Selector.WithCSS(css).ToGPALObject() ]")]
1386 TResult ToGPALObject();
1387 }
1388
1389 #region YouTube
1390 public interface IGPALYouTube
1391 {
1392 // Upload phase
1393 IGPALYouTube WithCredentials(ICredentials credentials);
1394 IGPALYouTube WithTitle(string title);
1395 IGPALYouTube WithDescription(string description);
1396 IGPALYouTube WithTags(params string[] tags);
1397 IGPALYouTube WithPrivacy(Enums.YouTubePrivacy privacy);
1398 IGPALYouTube WithCategory(Enums.YouTubeCategory category);
1400 // Schedule phase: collect upload results, set poll interval, then ScheduleAt fires a background thread
1401 IGPALYouTube WithVideo(Browser.YouTubeUploadResult result);
1402 IGPALYouTube WithVideos(IEnumerable<Browser.YouTubeUploadResult> results);
1403 IGPALYouTube WaitForProcessing(int pollIntervalSeconds = 60);
1404 IGPALYouTube WithOutputTo(System.Windows.Forms.TextBoxBase control);
1405 IGPALYouTube ScheduleAt(Browser.PremiereTime premiereTime);
1406 void WaitForCompletion();
1407 // Playlist phase
1408 IGPALYouTube WithPlaylist(string playlistId);
1409 Browser.YouTubePlaylistResult CreatePlaylist();
1410 IGPALYouTube AddToPlaylist(string playlistId);
1411 // Lookup / Search phase
1412 IGPALYouTube WithVideoId(string videoId);
1413 IGPALYouTube WithSearchTerms(string query);
1414 IGPALYouTube WithSearchTerms(IGPALGrid<string> grid);
1415 IGPALYouTube GetResults(out Browser.YouTubeVideoInfo info);
1416 IGPALYouTube GetResults(out System.Collections.Generic.List<Browser.YouTubeVideoInfo> results);
1417 }
1418 #endregion YouTube
1419
1420}
Application object that contains the fluent methods to create your Application workflow....
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...
Browser object that contains the fluent methods to create your Browser workflow. Instatiated using G...
Definition Browser.cs:68
delegate CallIfStatus CallOnFailDelegate(IBrowser browser, GPALFailure failure, string detail)
Delegate for the CallOnFail handler, invoked when something fails that the workflow,...
delegate CallIfStatus CallAfterFetchDelegate(IBrowser browser, List< string > results, IGPALGrid< string > tokens, int tokenIdx)
Delegate callback for the CallAfterFetch handler declared on a GPALRequest, invoked after each row of...
delegate CallIfStatus CallIfDelegate(IBrowser browser, List< IGPALElement > foundElements, List< IGPALElement > matchedElements, Selector selector, bool matchedAll)
Delegate callback for the CallIfFound/CallIfNotFound EventHandlers which will be invoked when a selec...
Represents a URL with optional pre-navigation storage cleanup / inspection actions....
Definition GPALUrl.cs:53
Result returned by GPALYouTube.CreatePlaylist containing the playlist ID and public URL.
Definition YouTube.cs:67
Result returned by GPALYouTube.Upload containing the assigned video ID, public URL,...
Definition YouTube.cs:104
Video metadata returned by GPALYouTube.GetResults. Tags are populated for direct video lookups; searc...
Definition YouTube.cs:82
Represents a client-side bounding rectangle (similar to DOMRect) with additional convenience properti...
Class to define database usage. Currently only used for input from a table, sql or stored procedure....
Pseudo element used in Applications and Browser workflows for image matching and unified automation....
GPAL File object instantied with GPAL.File Used to load tokens into a GPALGrid [rows/columns].
Definition GPALFile.cs:36
Form object that contains the fluent methods to create interactive forms. Instatiated using GPAL....
Definition GPALForm.cs:64
A GPAL single line input instantiated with GPAL.Input for use on GPAL forms. Callback EventHandler i...
A status bar (usually docked at the bottom of the form) that displays real-time messages,...
A GPAL multiline textare instantiated with GPAL.TextArea for use on GPAL forms. Callback EventHandle...
Everything starts here, all the GPAL controls and global settings using fluent syntax are here....
Definition GPAL.cs:49
Deserialized contents of a Google Cloud service account JSON key file, used by GoogleHandler....
Fluent REST client for making API calls with a chained interface. Supports defining workflows,...
Definition RESTClient.cs:57
GPAL Selector used to locate Application and Browser elements. Instantiated with GPAL....
Definition Selector.cs:56
delegate CallIfStatus webMatchingFunction(List< IGPALElement > foundElements, out List< IGPALElement > matchedElements, out bool matchedAll, Selector selector, bool ExactMatch=true)
Custom matching function, must return all matched elements and an indicator as to whether all element...
delegate CallIfStatus appMatchingFunction(List< GPALAutomationElement > foundElements, out List< GPALAutomationElement > matchedElements, out bool matchedAll, Selector selector, bool ExactMatch=true)
Custom matching function, must return all matched elements and an indicator as to whether all element...
Represents XPath matching information returned by advanced selector strategies.
IAllowAIOutput WithLiveInputFrom(GPALForm.GPALTextArea textArea, int debounceMilliseconds=500)
Like WithInputFrom(object), but also wires the control's TextChanged event (debounced) to call Execut...
IAllowAIOutput WithLiveInputFrom(GPALForm.GPALInput input, int debounceMilliseconds=500)
Like WithInputFrom(object), but also wires the control's TextChanged event (debounced) to call Execut...
IAllowParametersAndActions Execute(out List< int > rowCountsPerStatement)
Per-statement breakdown (via SqlCommand.StatementCompleted) instead of the single aggregate count.
SaveTo(...) already ran the read (an out parameter forces that), so chaining .Execute() afterward wou...
IAllowDatabaseSettings GetRowCount(out List< int > rowCountsPerTable)
Only SaveTo(out IGPALGrid<string>) returns this - meaningless for SaveTo(DataTable)/SaveTo(DataSet),...
IAllowRESTExecution SendString(string text, int delayMs=0)
Simulates typing in OttoMagic: dispatches key events character-by-character. Honors GPAL....
Represents a premiere schedule time. Presets (In5Minutes, In1Hour, etc.) store a relative offset and ...
Definition YouTube.cs:36