public static Logs ReadFileByActions_iOS() { StreamReader sr = new StreamReader(iOSFilePath); string s = null; Logs logs = new Logs(); logs._actions = new List<Actions>(); Actions actions = new Actions(); actions._oneAction = new List<OneAction>(); OneAction oneAction = new OneAction(); string actid, pageid; //List<string> logs = new List<string>(); List<string> actionsList = new List<string>(); List<string> oneActionList = new List<string>(); List<string> pageIDList = new List<string>(); List<string> actIDList = new List<string>(); while ((s = sr.ReadLine()) != null) { string[] LogsText = s.Split(']'); for (int i = 0; i < LogsText.Length - 1; i++) { actions._oneAction = new List<OneAction>(); string[] ActionsText = LogsText[i].Split('}'); string[] oneActionText = ActionsText[i].Replace('[', ' ').Replace('{', ' ').Replace('\"', ' ').Replace(" ", "").Split(','); if (ActionsText[i].Contains("i-ajk")) { for (int j = 0; j < ActionsText.Length - 1; j++) { oneAction = GetIOSActID(ActionsText, oneActionText, j); actions._oneAction.Add(oneAction); } logs._actions.Add(actions); } } } return logs; }
public static void MyClassInitialize(TestContext testContext) { actions = Common.ReadFileByLines_Andriod(); logs = Common.ReadFileByActions_Andriod(); actionsInList = Common.ReadActionMap(Common.ActionCommonMap); }
public static void MyClassInitialize(TestContext testContext) { iOSActions = Common.ReadFileByLines_iOS(); iOSLogs = Common.ReadFileByActions_iOS(); actionsInList = Common.ReadActionMap(Common.ActionCommonMap); }