/// <summary> /// Initialize the TestExecutionContext. This must be done /// before executing the WorkItem. /// </summary> /// <remarks> /// Originally, the context was provided in the constructor /// but delaying initialization of the context until the item /// is about to be dispatched allows changes in the parent /// context during OneTimeSetUp to be reflected in the child. /// </remarks> /// <param name="context">The TestExecutionContext to use</param> public void InitializeContext(TestExecutionContext context) { Guard.OperationValid(_context == null, "The context has already been initialized"); _context = context; if (Test is TestAssembly) { _actions.AddRange(ActionsHelper.GetActionsFromAttributeProvider(((TestAssembly)Test).Assembly)); } else if (Test is ParameterizedMethodSuite) { _actions.AddRange(ActionsHelper.GetActionsFromAttributeProvider(Test.Method.MethodInfo)); } else if (Test.TypeInfo != null) { _actions.AddRange(ActionsHelper.GetActionsFromTypesAttributes(Test.TypeInfo.Type)); } }
private (Actions action, string[] args) ParseCommandLine(string command) { var match = commandLineRegex_.Match(command); if (!match.Success) { return(Actions.Unrecognized, new string[] { }); } var action = match.Groups["action"].Value; var arguments = match.Groups["args"].Value; var args = CommandLineHelper.SplitArgs(arguments); if (!ActionsHelper.TryParseEnum(action, out var cmd)) { return(Actions.Unrecognized, new string[] { }); } return(cmd, args); }
public virtual void DBClick(int x = -1, int y = -1) { ActionsHelper actionsHelper = ActionsHelper.getInstance(); actionsHelper.DBClick(RelayObject.SEWebElement, x, y); }
public virtual void TypeText(string Text) { ActionsHelper actionsHelper = ActionsHelper.getInstance(); actionsHelper.TypeText(RelayObject.SEWebElement, Text); }
public virtual void ClearValue() { ActionsHelper actionsHelper = ActionsHelper.getInstance(); actionsHelper.ClearValue(RelayObject.SEWebElement); }
public virtual void MarkText(int start, int end) { ActionsHelper actionsHelper = ActionsHelper.getInstance(); actionsHelper.MarkText(RelayObject.SEWebElement, start, end); }
public virtual void MarkText(string markText) { ActionsHelper actionsHelper = ActionsHelper.getInstance(); actionsHelper.MarkText(RelayObject.SEWebElement, markText); }