//public void Flow_PlugInOutServer(string deviceNameVm, string waitTime, string index, string runTimes) public void Flow_PlugInOutServer(string deviceNamesVm, XmlOps deviceInfo) { var testTimes = 8; try { testTimes = Convert.ToInt32(deviceInfo.GetRunTimes(deviceNamesVm)); } catch (Exception) { // ignored } var waitTime = deviceInfo.GetWaitTime(deviceNamesVm); var timeout = Convert.ToInt16(waitTime); for (var i = 1; i < testTimes; i++) { var devices = UtilString.GetSplitArray(deviceNamesVm, ","); foreach (var device in devices) { var index = deviceInfo.GetIndex(device); PortalTestActions.SetLaunchTimesAndWriteTestTitle(i); PortalTestActions.PlugOutDeviceFromVm(device, waitTime, index); } SW.WriteConsoleTitle(i, $"Waiting for connecting/disconnecting. ({timeout}s)", timeout); } }
public IEnumerable <string> GetContentList() { Load(); var c = app.GetElementFromChild(new ATElementStruct() { Name = "RichEdit Control" }).DoGetValue(); if (!c.Equals("\r")) { return(UtilString.GetSplitArray(c, "\r").Reverse()); } return(null); }
private static string RemoveCommentFromOption(string comment) { return(UtilString.GetSplitArray(comment, OPTION_COMMENT_SEPARATOR_PREFIX).ToList()[0]); }