예제 #1
0
    def testSelect(self):
        try:
            self.testCaseInfo.starttime = cc.getCurrentTime()
            # 进入select页面
            self.page.clickFormTest()
            self.page.alert()
            self.page = FormTest(self.page)
            # 选择下拉框
            self.page.clickselect()
            text = self.page.alert('text')
            #断言alert提示框信息
            assert ('change' in text)
            self.page.alert()
            time.sleep(2)
            self.testCaseInfo.result = "Pass"

        except Exception as err:
            self.testCaseInfo.errorinfo = str(err)
            LogUtility.Log(("Got error: " + str(err)))
        finally:
            self.testCaseInfo.endtime = cc.getCurrentTime()
            self.testCaseInfo.secondsDuration = cc.timeDiff(self.testCaseInfo.starttime, self.testCaseInfo.endtime)
        pass