} // end getInstance //********************************************************************** /// <summary> /// Read the application path from scripts and run /// </summary> public void runApp() { opXls = new LxXlsOper(); opXls.open(m_strExcelDirve); m_strApplicationName = opXls.readCell(2, 2); Console.WriteLine(m_strApplicationName); m_iRowNum = Convert.ToInt16(opXls.readCell(7, 2)); m_iProcessId = Host.Local.RunApplication(m_strApplicationName); }
//********************************************************************** /// <summary> /// Read the application path from scripts and run /// </summary> public void runApp() { if (!File.Exists(m_strExcelDirve)) { runOverOneCase(getTestCaseName()); throw new Ranorex.ElementNotFoundException("The file " + m_strExcelDirve + " not found", null); } opXls = new LxXlsOper(); opXls.open(m_strExcelDirve); m_strApplicationName = opXls.readCell(2, 2); Console.WriteLine(m_strApplicationName); m_iRowNum = Convert.ToInt16(opXls.readCell(7, 2)); string runningRange = opXls.readCell(8, 2); Regex rex = new Regex("[0-9]+"); if (runningRange == "" || runningRange.IndexOf("a") != -1) { m_iRowStart = 1; m_iRowEnd = m_iRowNum; } else { string[] range = runningRange.Split('-'); m_iRowStart = Convert.ToInt16(range[0]); if (runningRange.IndexOf("-") == -1) { m_iRowEnd = m_iRowNum; } else { m_iRowEnd = Convert.ToInt16(range[1]); } } if (m_iRowStart == 1 && m_strApplicationName != "") { m_iProcessId = Host.Local.RunApplication(parseToValue(m_strApplicationName)); } else { m_iProcessId = 0; } }
//********************************************************************** /// <summary> /// Read the application path from scripts and run /// </summary> public void runApp() { opXls = new LxXlsOper(); opXls.open(m_strExcelDirve); m_strApplicationName = opXls.readCell(2,2); Console.WriteLine(m_strApplicationName); m_iRowNum = Convert.ToInt16(opXls.readCell(7,2)); m_iProcessId = Host.Local.RunApplication(m_strApplicationName); }
/// <summary> /// Read the application path from scripts and run /// </summary> public void runApp() { if(!File.Exists(m_strExcelDirve)) { runOverOneCase(getTestCaseName()); throw new Ranorex.ElementNotFoundException("The file " + m_strExcelDirve + " not found", null); } opXls = new LxXlsOper(); opXls.open(m_strExcelDirve); m_strApplicationName = opXls.readCell(2,2); Console.WriteLine(m_strApplicationName); m_iRowNum = Convert.ToInt16(opXls.readCell(7,2)); m_strPrecondition = opXls.readCell(23,2); string runningRange = opXls.readCell(8,2); Regex rex = new Regex("[0-9]+"); if(runningRange == "" || runningRange.IndexOf("a") != -1) { m_iRowStart = 1; m_iRowEnd = m_iRowNum; } else{ string[] range = runningRange.Split('-'); m_iRowStart = Convert.ToInt16(range[0]); if(runningRange.IndexOf("-") == -1) { m_iRowEnd = m_iRowNum; } else { m_iRowEnd = Convert.ToInt16(range[1]); } } if(m_iRowStart == 1 && m_strApplicationName!="") { m_iProcessId = Host.Local.RunApplication(parseToValue(m_strApplicationName)); } else { m_iProcessId = 0; } //Excute Precondition script to verify the Precondtion. try { if (!(m_strPrecondition.Trim().Equals(""))) { string PathValue = getConfigValue(m_strPrecondition); m_strPrecondition = getPath(PathValue); VerifyCondition(); } } catch(Exception e) { LxLog.Error("Error","The Precondition is not ready because: "+e.Message.ToString()); return; } }
//********************************************************************** /// <summary> /// Read the application path from scripts and run /// </summary> public void runApp() { if(!File.Exists(m_strExcelDirve)) { runOverOneCase(getTestCaseName()); throw new Ranorex.ElementNotFoundException("The file " + m_strExcelDirve + " not found", null); } opXls = new LxXlsOper(); opXls.open(m_strExcelDirve); m_strApplicationName = opXls.readCell(2,2); Console.WriteLine(m_strApplicationName); m_iRowNum = Convert.ToInt16(opXls.readCell(7,2)); string runningRange = opXls.readCell(8,2); Regex rex = new Regex("[0-9]+"); if(runningRange == "" || runningRange.IndexOf("a") != -1) { m_iRowStart = 1; m_iRowEnd = m_iRowNum; } else{ string[] range = runningRange.Split('-'); m_iRowStart = Convert.ToInt16(range[0]); if(runningRange.IndexOf("-") == -1) { m_iRowEnd = m_iRowNum; } else { m_iRowEnd = Convert.ToInt16(range[1]); } } if(m_iRowStart == 1 && m_strApplicationName!="") { m_iProcessId = Host.Local.RunApplication(parseToValue(m_strApplicationName)); } else { m_iProcessId = 0; } }
/// <summary> /// Read the application path from scripts and run /// </summary> public void runApp() { if (!File.Exists(m_strExcelDirve)) { runOverOneCase(getTestCaseName()); throw new Ranorex.ElementNotFoundException("The file " + m_strExcelDirve + " not found", null); } opXls = new LxXlsOper(); opXls.open(m_strExcelDirve); m_strApplicationName = opXls.readCell(2, 2); Console.WriteLine(m_strApplicationName); m_iRowNum = Convert.ToInt16(opXls.readCell(7, 2)); m_strPrecondition = opXls.readCell(23, 2); string runningRange = opXls.readCell(8, 2); Regex rex = new Regex("[0-9]+"); if (runningRange == "" || runningRange.IndexOf("a") != -1) { m_iRowStart = 1; m_iRowEnd = m_iRowNum; } else { string[] range = runningRange.Split('-'); m_iRowStart = Convert.ToInt16(range[0]); if (runningRange.IndexOf("-") == -1) { m_iRowEnd = m_iRowNum; } else { m_iRowEnd = Convert.ToInt16(range[1]); } } if (m_iRowStart == 1 && m_strApplicationName != "") { m_iProcessId = Host.Local.RunApplication(parseToValue(m_strApplicationName)); } else { m_iProcessId = 0; } //Excute Precondition script to verify the Precondtion. try { if (!(m_strPrecondition.Trim().Equals(""))) { VerifyCondition(); } } catch (Exception e) { LxLog.Error("Error", "The Precondition is not ready because: " + e.Message.ToString()); return; } }