public void Mouse_Click_ButtonOK(RepoItemInfo buttonInfo) { Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'buttonInfo' at Center.", buttonInfo); try { buttonInfo.WaitForExists(2000); buttonInfo.FindAdapter <Button>().Click(); } catch (Exception) { } }
public void Mouse_Click_ButtonNoIfConformationDialogAppears(RepoItemInfo buttonInfo) { Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'buttonInfo'.", buttonInfo); try { buttonInfo.WaitForExists(2000); buttonInfo.FindAdapter <Button>().Click(); } catch (Exception) { } }
public void MergeScreenshotAndWaitUntilDialogClosed(RepoItemInfo formInfo) { try { formInfo.WaitForExists(2000); Report.Screenshot(ReportLevel.Info, "User", "", formInfo.FindAdapter <Form>(), false); Report.Info("Waiting 4h to not exist. Associated repository item: 'formInfo'" + formInfo.ToString()); formInfo.WaitForNotExists(14400000); } catch (Exception) { } }
public override RanorexStepExecutionResponse Execute(Dictionary <string, object> arguments) { RanorexStepExecutionResponse stepResponse = new RanorexStepExecutionResponse(); try { RepoItemInfo repoItemInfo = null; string target = (string)arguments.GetValueOrDefault <string, object>("target"); string waitAction = (string)arguments.GetValueOrDefault <string, object>("waitAction"); int waitTimeout = Convert.ToInt32(arguments.GetValueOrDefault <string, object>("waitTimeout")); int timeout = Convert.ToInt32(arguments.GetValueOrDefault <string, object>("timeout")); if (waitAction == default(string)) { throw new Exception("No wait action defined!"); } if (target != default(string)) { repoItemInfo = CreateItemInfo(repo, target, timeout); } if (repoItemInfo != null) { switch (waitAction) { case "Exists": repoItemInfo.WaitForExists(waitTimeout); break; case "NotExists": repoItemInfo.WaitForNotExists(waitTimeout); break; } } else { throw new Exception("No target defined!"); } stepResponse.success = true; } catch (Exception e) { stepResponse.message = "Ranorex Exception: " + e.Message; stepResponse.success = false; } return(stepResponse); }
public void ClickOnSelectionExportTypeIfDialogPresent(RepoItemInfo listitemInfo, RepoItemInfo buttonInfo) { try{ Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'listitemInfo' at Center if present.", listitemInfo); listitemInfo.WaitForExists(1000); listitemInfo.FindAdapter <ListItem>().Click(); Report.Log(ReportLevel.Info, "Mouse", "Mouse Left Click item 'buttonInfo' at Center if present.", buttonInfo); buttonInfo.WaitForExists(1000); buttonInfo.FindAdapter <Button>().Click(); } catch (Exception) { // dialog was not shown for this FM } }