WinDriverVirtualUserScript Reference
WinDriverVirtualUserScript Summary of Methods
Window Methods | |
---|---|
Method | Description |
FindTopWindow/ FindTopAutomationWindow |
Return a top level window matching the supplied selection criteria. |
FindTopWindows/ FindTopAutomationWindows |
Return a list of of top level windows matching the supplied selection criteria. |
FindControl |
Return a control matching the supplied criteria |
FindControls |
Return a list of controls matching the supplied criteria |
GetWindowText |
Return the control text. Can be used on items such as a window title |
SetForegroundWindow |
Set a window into the foreground and activate the window |
ShowWindow |
Show, maximise, minimise or otherwise change a windows state. |
Window Control and AutomationControl Methods | |
---|---|
Method | Description |
ClickButton |
Click a windows button Control |
GetComboBoxItems |
Returns a list of the items in a windows combo box Control. |
SelectComboBoxItem |
Selects a specified item (value or index number) in a Combo box Control |
GetListBoxItems |
Returns a list of items in a list box Control |
SelectListBoxItem |
Selects a specified item (value or index number) in a list box Control |
GetEditText |
Return the text in an edit Control |
SetEditText |
Set the text in an edit Control |
|
|
SetCursorPosBottomRHS |
Set the cursor position relative to the bottom right corner of window |
SetCursorPosTopLHS |
Set the cursor position relative to the top left hand corner of the window |
LeftClick |
Left click in the centre of the given window |
DoubleLeftClick |
Double left click at the current cursor position |
LeftClickBelowRHS |
Left click below bottom right of window |
LeftClickLHS |
Left click top left hand side of window |
LeftClickRHS |
Left click top right hand side of window |
RightClick |
Right click centre of window |
Mouse Methods | |
---|---|
Method | Description |
DoubleLeftClick |
Double click the left mouse button. |
DoubleMiddleClick |
Double click the middle mouse. |
DoubleRightClick |
Double click the right mouse. |
LeftClick |
Click the left mouse button. |
MiddleClick |
Click the middle mouse button. |
RightClick |
Click the right mouse button. |
ClickPause |
Set the default pause time in milliseconds following each click action. |
DoubleClickPause |
Set the default pause time in milliseconds following each double click action. |
Menu Controls Methods | |
---|---|
Method | Description |
GetTopMenu |
Return the menu handle of the window's main, top level menu. |
ActivateMenuItem |
Activate a windows menu item |
Controls derived from SysTreeView32 and SysListView32 are supported using the following methods on 32-bit runtime.
ListView | |
---|---|
Method | Description |
GetListItemCount |
Return the number of items in the List |
GetListItemLocation |
Return the location coordinates of the item with the given index number |
GetListItemText |
Return the test of the item for the given index and column |
GetListItemPointFromName |
Return the location of the item with the given name and column |
EnsureVisibleListItem |
Scroll the list view to ensure the item given by an index number is visible |
SelectListItem |
Set the item given by the index number to the selected state |
TreeView |
|
---|---|
Method | Description |
GetTreeViewItemCount |
Return the number of visible items in the Tree |
GetTreeItemLocation |
Return the location coordinates of the item with the given name |
GetTreeItemRectange |
Return the rectangle enclosing the item |
ExpandTreeItem |
Return the location of the item |
EnsureVisibleTreeItem |
Scroll the list view to ensure the item is visible |
SelectTreeItem |
Set the item to the selected state |
GetTreeItemText |
Get the text of the item for the given index number |
Metadata
using Facilita.Fc.Runtime;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Windows.Automation;
namespace Facilita.Fc.WinDriver
{
public abstract class WinDriverVirtualUserScript : VirtualUserScript
{
protected WinDriverVirtualUserScript();
public Keyboard Keyboard { get; }
public int MaxSearchDepth { get; set; }
public int MaxWait { get; set; }
public Mouse Mouse { get; }
public int PausePerKeyPress { get; set; }
public int RetryInterval { get; set; }
public WinDriverVirtualUser VU { get; }
public AutomationControl AutomationWindowFromPoint();
public AutomationControl AutomationWindowFromPoint(Point p);
public AutomationControl FindTopAutomationWindow(ControlType controlType);
public AutomationControl FindTopAutomationWindow(MatchCriteria matchCriteria);
public AutomationControl FindTopAutomationWindow(Predicate<AutomationControl> selectionFunction);
public AutomationControl FindTopAutomationWindow(string wantedText);
public AutomationControl FindTopAutomationWindow(MatchCriteria matchCriteria, int maxWait);
public AutomationControl FindTopAutomationWindow(Predicate<AutomationControl> selectionFunction, int maxWait);
public AutomationControl FindTopAutomationWindow(string wantedText, ControlType controlType);
public AutomationControl FindTopAutomationWindow(string wantedText, int maxWait);
public AutomationControl FindTopAutomationWindow(string wantedText, string wantedClass);
public AutomationControl FindTopAutomationWindow(string wantedText, TextMatch textMatch);
public AutomationControl FindTopAutomationWindow(string wantedText, string wantedClass, int maxWait);
public AutomationControl FindTopAutomationWindow(string wantedText, string wantedClass, TextMatch textMatch);
public AutomationControl FindTopAutomationWindow(string wantedText, TextMatch textMatch, ControlType controlType);
public AutomationControl FindTopAutomationWindow(string wantedText, TextMatch textMatch, int maxWait);
public AutomationControl FindTopAutomationWindow(string wantedText, string wantedClass, TextMatch textMatch, int maxWait);
public IList<AutomationControl> FindTopAutomationWindows(ControlType controlType);
public IList<AutomationControl> FindTopAutomationWindows(MatchCriteria matchCriteria);
public IList<AutomationControl> FindTopAutomationWindows(Predicate<AutomationControl> selectionFunction);
public IList<AutomationControl> FindTopAutomationWindows(string wantedText);
public IList<AutomationControl> FindTopAutomationWindows(string wantedText, ControlType controlType);
public IList<AutomationControl> FindTopAutomationWindows(string wantedText, string wantedClass);
public IList<AutomationControl> FindTopAutomationWindows(string wantedText, TextMatch textMatch);
public IList<AutomationControl> FindTopAutomationWindows(string wantedText, string wantedClass, TextMatch textMatch);
public IList<AutomationControl> FindTopAutomationWindows(string wantedText, TextMatch textMatch, ControlType controlType);
public Control FindTopWindow(MatchCriteria matchCriteria);
public Control FindTopWindow(Predicate<IControl> selectionFunction);
public Control FindTopWindow(string wantedText);
public Control FindTopWindow(MatchCriteria matchCriteria, int maxWait);
public Control FindTopWindow(Predicate<IControl> selectionFunction, int maxWait);
public Control FindTopWindow(string wantedText, int maxWait);
public Control FindTopWindow(string wantedText, string wantedClass);
public Control FindTopWindow(string wantedText, TextMatch textMatch);
public Control FindTopWindow(string wantedText, string wantedClass, int maxWait);
public Control FindTopWindow(string wantedText, string wantedClass, TextMatch textMatch);
public Control FindTopWindow(string wantedText, TextMatch textMatch, int maxWait);
public Control FindTopWindow(string wantedText, string wantedClass, TextMatch textMatch, int maxWait);
public AutomationControl FindTopWindowByAutomationId(string automationId);
public IList<Control> FindTopWindows(MatchCriteria matchCriteria);
public IList<Control> FindTopWindows(Predicate<IControl> selectionFunction);
public IList<Control> FindTopWindows(string wantedText);
public IList<Control> FindTopWindows(string wantedText, string wantedClass);
public IList<Control> FindTopWindows(string wantedText, TextMatch textMatch);
public IList<Control> FindTopWindows(string wantedText, string wantedClass, TextMatch textMatch);
public Point GetCursorPos();
public void SaveBitmap(string pathName, Rectangle rectangle);
public void SaveBitmap(string pathName, int x, int y, int width, int height);
public void SendKeys(string text);
public Rectangle WaitForScreenMatch(Rectangle expectedLocation, string bitmapFile);
public Rectangle WaitForScreenMatch(Rectangle expectedLocation, string bitmapFile, int maxWait, int searchRadius);
public void WaitForTopWindowCount(MatchCriteria matchCriteria, int count);
public void WaitForTopWindowCount(Predicate<IControl> selectionFunction, int count);
public void WaitForTopWindowCount(string wantedText, int count);
public void WaitForTopWindowCount(MatchCriteria matchCriteria, int count, int maxWait);
public void WaitForTopWindowCount(Predicate<IControl> selectionFunction, int count, int maxWait);
public void WaitForTopWindowCount(string wantedText, int count, int maxWait);
public void WaitForTopWindowCount(string wantedText, string wantedClass, int count);
public void WaitForTopWindowCount(string wantedText, TextMatch textMatch, int count);
public void WaitForTopWindowCount(string wantedText, string wantedClass, int count, int maxWait);
public void WaitForTopWindowCount(string wantedText, string wantedClass, TextMatch textMatch, int count);
public void WaitForTopWindowCount(string wantedText, TextMatch textMatch, int count, int maxWait);
public void WaitForTopWindowCount(string wantedText, string wantedClass, TextMatch textMatch, int count, int maxWait);
public void WaitWhileTopWindowCount(MatchCriteria matchCriteria, int count);
public void WaitWhileTopWindowCount(Predicate<IControl> selectionFunction, int count);
public void WaitWhileTopWindowCount(string wantedText, int count);
public void WaitWhileTopWindowCount(MatchCriteria matchCriteria, int count, int maxWait);
public void WaitWhileTopWindowCount(Predicate<IControl> selectionFunction, int count, int maxWait);
public void WaitWhileTopWindowCount(string wantedText, int count, int maxWait);
public void WaitWhileTopWindowCount(string wantedText, string wantedClass, int count);
public void WaitWhileTopWindowCount(string wantedText, TextMatch textMatch, int count);
public void WaitWhileTopWindowCount(string wantedText, string wantedClass, int count, int maxWait);
public void WaitWhileTopWindowCount(string wantedText, string wantedClass, TextMatch textMatch, int count);
public void WaitWhileTopWindowCount(string wantedText, TextMatch textMatch, int count, int maxWait);
public void WaitWhileTopWindowCount(string wantedText, string wantedClass, TextMatch textMatch, int count, int maxWait);
public Control WindowFromPoint();
public Control WindowFromPoint(Point p);
}
}