def test_env_export_button_one(self): env = SysEnvironmentPage(self.driver) self.url = '/managecenter/system/environment' env.open(self.url) env.login_action('admin', 'admin') time.sleep(3) env.checkbox_one() time.sleep(3) env.button_export_click() time.sleep(5) insert_img(self.driver, 'env_export_button_one.jpg')
def test_env_export_button_all(self): env = SysEnvironmentPage(self.driver) self.url = '/managecenter/system/environment' env.open(self.url) env.login_action('admin', 'admin') time.sleep(3) env.button_export_click() time.sleep(3) try: self.assertEqual(env.test_export_button_all_error(), '导出全部?') log().info('Judge success, and the result is:' + env.test_export_button_all_error()) except Exception as e: log().exception('Failing judgment, the result is:') log().exception(e) insert_img(self.driver, 'env_export_button_all.jpg')