コード例 #1
0
    def test_env_delete_button_sure(self):
        env = SysEnvironmentPage(self.driver)
        self.url = '/managecenter/system/environment'
        env.open(self.url)
        env.login_action('admin', 'admin')
        time.sleep(3)
        env.new_environment('test_delete_successful', 'test_delete_successful',
                            '1', '1', 'test_delete_successful')
        time.sleep(3)
        env.input_variable_name('test_delete_successful')
        time.sleep(3)
        env.checkbox_one()
        time.sleep(3)
        env.butto_delect_click()
        time.sleep(3)
        env.delete_sure_button()
        time.sleep(3)
        env.input_variable_name('env_delete_button_sure')

        try:
            self.assertEqual(env.show_no_content_error(), '暂无内容')
            log().info('Judge success, and the result is:' +
                       env.show_no_content_error())
        except Exception as e:
            log().exception('Failing judgment, the result is:')
            log().exception(e)
        insert_img(self.driver, 'test_delete_button_sure.jpg')
コード例 #2
0
 def test_env_editor_page_save(self):
     env = SysEnvironmentPage(self.driver)
     self.url = '/managecenter/system/environment'
     env.open(self.url)
     env.login_action('admin', 'admin')
     time.sleep(3)
     env.new_environment('test_editor_successful', 'test_editor_successful',
                         '1', '1', 'test_editor_successful')
     time.sleep(3)
     env.input_variable_name('test_editor_successful')
     time.sleep(3)
     env.checkbox_one()
     time.sleep(3)
     env.button_editor_click()
     time.sleep(3)
     env.editor_environment('change_test_editor_successful', '2', '2',
                            'change_test_editor_successful')
     time.sleep(3)
     try:
         self.assertEqual(env.test_newpage_editor_save_error(),
                          'change_test_editor_successful')
         log().info('Judge success, and the result is:' +
                    env.test_newpage_editor_save_error())
     except Exception as e:
         log().exception('Failing judgment, the result is:')
         log().exception(e)
     insert_img(self.driver, 'env_editor_page_save.jpg')
コード例 #3
0
 def test_env_newpage_appname_null(self):
     env = SysEnvironmentPage(self.driver)
     self.url = '/managecenter/system/environment'
     env.open(self.url)
     env.login_action('admin', 'admin')
     time.sleep(3)
     env.new_environment('test_new_env', '', '1', '1', 'test_new_env')
     time.sleep(3)
     try:
         self.assertEqual(env.env_new_page_variable_error(), '此处为必填项,不能为空!')
         log().info('Judge success, and the result is:' +
                    env.env_new_page_variable_error())
     except Exception as e:
         log().exception('Failing judgment, the result is:')
         log().exception(e)
     insert_img(self.driver, 'env_newpage_appname_null.jpg')