19using System.Collections.Generic;
22using System.Threading;
23using System.Threading.Tasks;
53 private ElementSettings ElementSettings;
59 internal ElementAssistant()
61 ElementSettings =
new ElementSettings();
71 ElementSettings.InteractionType = InteractionType.JavaScript;
83 ElementSettings.InteractionType = InteractionType.Hardware;
94 ElementHelper.Click(ElementSettings.Browser, ElementSettings.Selector, ElementSettings.WebElement, ClickType.LeftClick, ModifierKeys.NONE);
106 ElementHelper.Click(ElementSettings.Browser, ElementSettings.Selector, ElementSettings.WebElement, ClickType.LeftClick, modifierKeys);
119 ElementSettings.WebElement = (
GPALElement)webElement;
120 ElementHelper.Click(ElementSettings.Browser, ElementSettings.Selector, ElementSettings.WebElement, ClickType.LeftClick, ModifierKeys.NONE);
134 ElementSettings.WebElement = (
GPALElement)webElement;
135 Browser.LeftClickAndDownload(downloadTo, (
GPALElement)webElement, ElementSettings.Selector);
148 ElementHelper.Click(ElementSettings.Browser, ElementSettings.Selector, ElementSettings.WebElement, ClickType.LeftDoubleClick, ModifierKeys.NONE);
158 ElementSettings.WebElement = (
GPALElement)webElement;
159 ElementHelper.Click(ElementSettings.Browser, ElementSettings.Selector, ElementSettings.WebElement, ClickType.LeftDoubleClick, ModifierKeys.NONE);
170 ElementHelper.Click(ElementSettings.Browser, ElementSettings.Selector, ElementSettings.WebElement, ClickType.MiddleClick, ModifierKeys.NONE);
183 ElementHelper.Click(ElementSettings.Browser, ElementSettings.Selector, ElementSettings.WebElement, ClickType.RightClick, ModifierKeys.NONE);
194 internal void ForSelector(
Selector selector)
196 ElementSettings.Selector = selector;
215 ElementHelper.FillInFrom(ElementSettings.Browser, inputText, WriteMode.Overwrite, ElementSettings.WebElement);
234 ElementHelper.FillInFrom(ElementSettings.Browser, inputText, WriteMode.Insert, ElementSettings.WebElement);
259 ElementHelper.FillInFrom(ElementSettings.Browser, inputText, WriteMode.Append, ElementSettings.WebElement);
281 ElementHelper.SendKey(Browser, keyCode);
291 ElementHelper.SendString(Browser, textToSend);
301 if (ModifierKeys.NONE != modifierKeys)
303 if (
true == ElementSettings.Browser.UseOttoMagic)
304 ElementSettings.Browser.MagicHelper.PressModifierKey(modifierKeys);
305 else if (
true == ElementSettings.Browser.UsePuppeteer)
306 ElementSettings.Browser.PuppeteerClient.PressModifierKey(modifierKeys);
308 HardwareHelper.PressModifierKey(modifierKeys);
320 if (ModifierKeys.NONE != modifierKeys)
322 if (
true == ElementSettings.Browser.UseOttoMagic)
323 ElementSettings.Browser.MagicHelper.ReleaseModifierKey(modifierKeys);
324 else if (
true == ElementSettings.Browser.UsePuppeteer)
325 ElementSettings.Browser.PuppeteerClient.ReleaseModifierKey(modifierKeys);
327 HardwareHelper.ReleaseModifierKeys(modifierKeys);
339 ElementHelper.ScrollElement(Browser, scrollAmount, ScrollTypes.Horizontal);
350 ElementHelper.ScrollElement(Browser, scrollAmount, ScrollTypes.Vertical);
366 ElementSettings.Browser = value;
Browser object that contains the fluent methods to create your Browser workflow. Instatiated using G...
IAllowElementSettingsAndActions PressModifierKey(ModifierKeys modifierKeys)
Press a modifier key: Alt, Control, Shift.
IAllowElementSettingsAndActions WithElement(IGPALElement GPALElement)
Define the element to act upon.
IAllowElementSettingsAndActions ReleaseModifierKey(ModifierKeys modifierKeys)
Release a modifier key: Alt, Control, Shift.
IAllowElementSettingsAndActions MiddleClick()
Left click the webelement, optionally emulating pressing a modifier key at the same time.
IAllowElementSettingsAndActions ScrollHorizontalPixels(int scrollAmount)
Scroll the element horizontally by number of pixels. Negative numbers scroll left....
IAllowElementSettingsAndActions RightClick(IGPALElement webElement=null)
Right click the webelement.
IAllowElementSettingsAndActions AppendFrom(string inputText)
Appends text to the end of the input webelement defined with .WithElement.
IAllowElementSettingsAndActions WithJavaScript
Interact with the webelement using javascript.
IAllowElementSettingsAndActions InsertFrom(string inputText)
Insert text at the beginning of the input webelement defined with .WithElement.
IAllowElementSettingsAndActions LeftDoubleClick(IGPALElement webElement)
Left double click the webelement.
IAllowElementSettingsAndActions LeftClick(Enums.ModifierKeys modifierKeys)
Left click the webelement, optionally emulating pressing a modifier key at the same time.
IAllowElementSettingsAndActions FillInFrom(string inputText)
Fill In (Ovewrite) text of the input webelement defined with .WithElement.
IAllowElementSettingsAndActions SendKey(byte keyCode)
Emulate pressing a special key like Home, End, Page Down. Use GPAL.VK_ defined virual keycodes or se...
IAllowElementSettingsAndActions LeftClick()
Left click the webelement, optionally emulating pressing a modifier key at the same time.
IAllowElementSettingsAndActions ScrollVerticalPixels(int scrollAmount)
Scroll the element vertically by number of pixels. Negative numbers scroll up. JavaScript only.
ElementAssistant ToGPALObject()
Returns this ElementAssistant as itself.
IAllowElementSettingsAndActions LeftDoubleClick()
Left double click the webelement.
IAllowElementSettingsAndActions LeftClick(IGPALElement webElement)
Left click the webelement, optionally emulating pressing a modifier key at the same time.
IAllowElementSettingsAndActions WithHardware
Interact with the webelement using hardware emulation.
IAllowElementSettingsAndActions LeftClickAndDownload(IGPALElement webElement, GPALFile downloadTo)
Left click the webelement and download a file.
IAllowElementSettingsAndActions SendString(string textToSend)
Send the string using hardware emulation.
Pseudo element used in Applications and Browser workflows for image matching and unified automation....
dynamic WebElement
The wrapped Selenium IWebElement or internal dynamic element.
GPAL File object instantied with GPAL.File Used to load tokens into a GPALGrid [rows/columns].
GPAL Selector used to locate Application and Browser elements. Instantiated with GPAL....