def test_002_interaction(self): """ 添加互动环节""" base.deprint("开始执行登录,并进入添加线下会互动环节用例") dr = self.driver o = LoginPage(dr) o.login() o = ChoosePage(dr) o.click_menu_bt('10') o = IndexPage(dr) o.click_linelist('2') o = InteractionAndCancle(dr) acture_result=o.interaction_and_cancle('1') excepet_result="已添加互动环节" # self.assertEqual(acture_result,excepet_result,"failed") base.deprint( "添加线下会互动环节添加用例完成")
'#setFiled > div > div > div.modal-footer > input' ) #点击确定按钮 self.deprint("添加互动环节成功") return "已添加互动环节" except: return "fail" if but_pos == '2': #如果是2,就是点击取消会议 handleNow = self.driver.current_window_handle # 获得当前窗口 self.driver.switch_to_window(handleNow) time.sleep(3) self.wait_is_visible( 'x', '//*[@id="commonAlertWindow"]/div/div/div[3]/button' ) #点击取消会议页面确定按钮 self.deprint("点击取消会议按钮") return u'取消会议成功' # self.close() if __name__ == "__main__": dr = brower() o = LoginPage(dr) o.login() o = ChoosePage(dr) o.click_menu_bt('9') o = IndexPage(dr) o.click_linelist('2') o = InteractionAndCancle(dr) o.interaction_and_cancle('2')