예제 #1
0
    def getModeList(self, f):
        bs = []
        gh = getXMl.getYam(f)
        for i in range(len(gh)):
            if i == 0:
                #用例id
                self.getTempCase.test_id = gh[i].get("test_id", "false")
                # 用例介绍
                self.getTempCase.test_intr = gh[i].get("test_intr", "false")
            # bt = self.BaseTestCase
            self.BaseTestCase.element_info = gh[i].get("element_info", "false")

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

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

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

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

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

            bs.append(
                json.loads(json.dumps(self.BaseTestCase().to_primitive())))
        return bs
예제 #2
0
    def getModeList(self, f):
        bs = []
        gh = getXMl.getYam(f)
        for i in range(len(gh)):
            if i == 0:
                #用例id
                self.getTempCase.test_id = gh[i].get("test_id", "false")
                # 用例介绍
                self.getTempCase.test_intr = gh[i].get("test_intr", "false")
            # bt = self.BaseTestCase
            self.BaseTestCase.element_info = gh[i]["element_info"]

            # 操作类型
            self.BaseTestCase.operate_type = gh[i].get("operate_type", "false")
            self.BaseTestCase.element_type = gh[i]["findElemtType"]
            # 输入文字
            self.BaseTestCase.msg = gh[i].get("msg", "false")

            # 验证类型
            self.BaseTestCase.find_type = gh[i].get("find_type", "false")
            bs.append(
                json.loads(json.dumps(self.BaseTestCase().to_primitive())))
        return bs