Ejemplo n.º 1
0
 public static void MyClassInitialize(TestContext testContext)
 {
     actions = Common.ReadFileByLines_Andriod();
     logs = Common.ReadFileByActions_Andriod();
     actionsInList = Common.ReadActionMap(Common.ActionCommonMap);
 }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
        public static Actions ReadFileByLines_iOS()
        {
            StreamReader sr = new StreamReader(iOSFilePath);
            sr.BaseStream.Seek(0, SeekOrigin.Begin);
            string s = sr.ReadToEnd();
            //string s = null;

            Actions actions = new Actions();
            actions._oneAction = new List<OneAction>();
            OneAction oneAction = new OneAction();
            List<string> undefineAction = new List<string>();

            string actid, pageid;

            string[] oneActionTextList = s.Split('}');
            for (int i = 0; i < oneActionTextList.Length - 1; i++)
            {
                if (oneActionTextList[i].Contains("i-ajk"))
                {
                    string[] oneActionText = oneActionTextList[i].Replace('[', ' ').Replace('{', ' ').Replace('\"', ' ').Replace(" ", "").Replace("]", "").Replace("\n", "").Split(',');

                    oneAction = GetIOSActID(oneActionText);
                    actions._oneAction.Add(oneAction);
                }

            }
            return actions;
        }
Ejemplo n.º 4
0
 public static void MyClassInitialize(TestContext testContext)
 {
     iOSActions = Common.ReadFileByLines_iOS();
     iOSLogs = Common.ReadFileByActions_iOS();
     actionsInList = Common.ReadActionMap(Common.ActionCommonMap);
 }