Exemplo n.º 1
0
    def getModeList(self, f):
        bs = []
        gh = operateYaml.getYam(f)
        for i in range(len(gh)):
            if i == 0:
                #用例id
                self.GetAppCaseInfo.test_id = gh[i].get("test_id", "false")
                # 用例介绍
                self.GetAppCaseInfo.test_intr = gh[i].get("test_intr", "false")
            # bt = self.GetAppCase
            self.GetAppCase.element_info = gh[i].get("element_info", "false")

            self.GetAppCase.log = r"c:/" + self.get_phone_name()[0]

            # 操作类型
            self.GetAppCase.operate_type = gh[i].get("operate_type", "false")
            # 输入文字
            self.GetAppCase.name = gh[i].get("name", "false")

            self.GetAppCase.index = gh[i].get("index", "false")

            self.GetAppCase.text = gh[i].get("text", "false")  # 对应by_link_text

            # 验证类型
            self.GetAppCase.find_type = gh[i].get("find_type", "false")

            self.GetAppCase.time = gh[i].get("time", 0)

            bs.append(json.loads(json.dumps(self.GetAppCase().to_primitive())))
        return bs
Exemplo n.º 2
0
 def getModeList(self, f):
     bs = []
     gh = operateYaml.getYam(f)
     for i in range(len(gh)):
         if i == 0:
             #用例id
             self.GetWebInfoCase.test_id = gh[i].get("test_id", "false")
             # 用例介绍
             self.GetWebInfoCase.test_intr = gh[i].get("test_intr", "false")
         self.GetWebCase.element_info = gh[i].get("element_info", "false")
         self.GetWebCase.open_url = gh[i].get("get_url", "false")
         # 操作类型
         self.GetWebCase.operate_type = gh[i].get("operate_type", "false")
         self.GetWebCase.index = gh[i].get("index", "false")
         self.GetWebCase.text = gh[i].get("text", "false")  # 输入的text
         # 验证类型
         self.GetWebCase.find_type = gh[i].get("find_type", "false")
         bs.append(json.loads(json.dumps(self.GetWebCase().to_primitive())))
     return bs
Exemplo n.º 3
0
def get_devices():
    return operateYaml.getYam(PATH("../devices.yaml"))