""" * Copyright (c) 2023 iSoftStone Information Technology (Group) Co.,Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. """ import unittest from Tool import WebView class Test(unittest.TestCase): @classmethod # 初始化测试环境且只会执行一次 def setUp(self) -> None: self.LE = WebView() self.LE.init_webview(test_package='com.example.myapplication') # 运行chromeDriver def test_infrastructure_001(self): self.LE.init_runner('test_infrastructure_001') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/assumptions/ahem-ref.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_implicit_expression_screenshot('/html/body/table/tbody/tr[17]/td[6]', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_implicit_expression_screenshot('/html/body/table/tbody/tr[17]/td[6]', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_001') def test_infrastructure_002(self): self.LE.init_runner('test_infrastructure_002') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/assumptions/ahem.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_implicit_expression_screenshot('/html/body/table/tbody/tr[17]/td[6]', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_implicit_expression_screenshot('/html/body/table/tbody/tr[17]/td[6]', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_002') def test_infrastructure_003(self): self.LE.init_runner('test_infrastructure_003') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/assumptions/blank.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_implicit_expression_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_file_screenshot("ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_003') def test_infrastructure_004(self): self.LE.init_runner('test_infrastructure_004') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/assumptions/canvas-background.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_screenshot('/html/body/p', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_file_screenshot("ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_004') def test_infrastructure_005(self): self.LE.init_runner('test_infrastructure_005') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/assumptions/initial-color.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_implicit_expression_screenshot('/html/body/p', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body/p', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_005') def test_infrastructure_006(self): self.LE.init_runner('test_infrastructure_006') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/assumptions/medium-font-size.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_screenshot('/html/body/p', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body/p', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_006') def test_infrastructure_007(self): self.LE.init_runner('test_infrastructure_007') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/assumptions/min-font-size.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_screenshot('/html/body/p', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body/p', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_007') def test_infrastructure_008(self): self.LE.init_runner('test_infrastructure_008') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/green-ref.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_implicit_expression_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_008') def test_infrastructure_009(self): self.LE.init_runner('test_infrastructure_009') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/legacy/fuzzy-ref-2.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_screenshot('/html/body/div', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body/div', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_009') def test_infrastructure_010(self): self.LE.init_runner('test_infrastructure_010') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/legacy/reftest_and_fail.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_implicit_expression_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_010') def test_infrastructure_011(self): self.LE.init_runner('test_infrastructure_011') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/legacy/reftest_and_fail_0-ref.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_011') def test_infrastructure_012(self): self.LE.init_runner('test_infrastructure_012') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/legacy/reftest_and_mismatch.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_implicit_expression_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_012') def test_infrastructure_013(self): self.LE.init_runner('test_infrastructure_013') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/legacy/reftest_and_mismatch_0.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_implicit_expression_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_013') def test_infrastructure_014(self): self.LE.init_runner('test_infrastructure_014') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/legacy/reftest_cycle.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_implicit_expression_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_014') def test_infrastructure_015(self): self.LE.init_runner('test_infrastructure_015') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/legacy/reftest_cycle_0-ref.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_implicit_expression_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_015') def test_infrastructure_016(self): self.LE.init_runner('test_infrastructure_016') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/legacy/reftest_cycle_1-ref.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_implicit_expression_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_016') def test_infrastructure_017(self): self.LE.init_runner('test_infrastructure_017') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/legacy/reftest_cycle_fail.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_implicit_expression_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_017') def test_infrastructure_018(self): self.LE.init_runner('test_infrastructure_018') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/legacy/reftest_cycle_fail_0-ref.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_implicit_expression_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_018') def test_infrastructure_019(self): self.LE.init_runner('test_infrastructure_019') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/legacy/reftest_fuzzy_chain_ini.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_implicit_expression_screenshot('/html/body/div', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body/div', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_019') def test_infrastructure_020(self): self.LE.init_runner('test_infrastructure_020') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/reftest.https.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_implicit_expression_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_020') def test_infrastructure_021(self): self.LE.init_runner('test_infrastructure_021') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/reftest.www.sub.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_implicit_expression_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_021') def test_infrastructure_022(self): self.LE.init_runner('test_infrastructure_022') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/reftest_fuzzy_1.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_implicit_expression_screenshot('/html/body/div', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body/div', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_022') def test_infrastructure_023(self): self.LE.init_runner('test_infrastructure_023') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/reftest_fuzzy_ini_full.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_implicit_expression_screenshot('/html/body/div', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body/div', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_023') def test_infrastructure_024(self): self.LE.init_runner('test_infrastructure_024') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/reftest_fuzzy_ini_ref_only.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_screenshot('/html/body/div', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body/div', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_024') def test_infrastructure_025(self): self.LE.init_runner('test_infrastructure_025') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/reftest_fuzzy_ini_short.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_screenshot('/html/body/div', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body/div', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_025') def test_infrastructure_026(self): self.LE.init_runner('test_infrastructure_026') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/reftest_fuzzy_no_differences.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_screenshot('/html/body/div', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body/div', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_026') def test_infrastructure_027(self): self.LE.init_runner('test_infrastructure_027') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/reftest_fuzzy_no_differences_1.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_screenshot('/html/body/div', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body/div', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_027') def test_infrastructure_028(self): self.LE.init_runner('test_infrastructure_028') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/reftest_match.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_028') def test_infrastructure_029(self): self.LE.init_runner('test_infrastructure_029') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/reftest_match_and_mismatch-0.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_029') def test_infrastructure_030(self): self.LE.init_runner('test_infrastructure_030') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/reftest_match_and_mismatch-1.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_030') def test_infrastructure_031(self): self.LE.init_runner('test_infrastructure_031') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/reftest_match_and_mismatch-2.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_031') def test_infrastructure_032(self): self.LE.init_runner('test_infrastructure_032') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/reftest_match_and_mismatch-3.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_032') def test_infrastructure_033(self): self.LE.init_runner('test_infrastructure_033') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/reftest_match_and_mismatch-4.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_033') def test_infrastructure_034(self): self.LE.init_runner('test_infrastructure_034') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/reftest_match_and_mismatch-5.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_034') def test_infrastructure_035(self): self.LE.init_runner('test_infrastructure_035') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/reftest_match_and_mismatch-6.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_035') def test_infrastructure_036(self): self.LE.init_runner('test_infrastructure_036') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/reftest_match_and_mismatch-7.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_036') def test_infrastructure_037(self): self.LE.init_runner('test_infrastructure_037') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/reftest_match_fail.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_037') def test_infrastructure_038(self): self.LE.init_runner('test_infrastructure_038') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/reftest_mismatch.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_038') def test_infrastructure_039(self): self.LE.init_runner('test_infrastructure_039') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/reftest_mismatch_fail.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_039') def test_infrastructure_040(self): self.LE.init_runner('test_infrastructure_040') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/reftest_multiple_match-0.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_040') def test_infrastructure_041(self): self.LE.init_runner('test_infrastructure_041') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/reftest_multiple_match-1.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_041') def test_infrastructure_042(self): self.LE.init_runner('test_infrastructure_042') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/reftest_multiple_mismatch-0.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_042') def test_infrastructure_043(self): self.LE.init_runner('test_infrastructure_043') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/reftest_multiple_mismatch-1.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_043') def test_infrastructure_044(self): self.LE.init_runner('test_infrastructure_044') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/reftest_ref_timeout.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_044') def test_infrastructure_045(self): self.LE.init_runner('test_infrastructure_045') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/reftest_timeout.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_045') def test_infrastructure_046(self): self.LE.init_runner('test_infrastructure_046') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/reftest_wait_0.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_046') def test_infrastructure_047(self): self.LE.init_runner('test_infrastructure_047') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/reftest_wait_TestRendered.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_screenshot('/html/body', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_047') def test_infrastructure_048(self): self.LE.init_runner('test_infrastructure_048') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest/size.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_implicit_expression_screenshot('//*[@id="size"]', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_implicit_expression_screenshot('/html/body/p', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_048') def test_infrastructure_049(self): self.LE.init_runner('test_infrastructure_049') # 打开runner页面 self.LE.click_js() # 取消勾选js self.LE.click_manual() # 取消勾选manual self.LE.send_path('infrastructure/reftest-wait.html') # 是否进入指定路径 默认是/ 即全部路径 self.LE.start_test() # 点击start test 按钮 self.LE.click_show_test() # 点击show test按钮 self.LE.test_screenshot('/html/body/div[1]', "test") # test页面截图 self.LE.click_show_ref() # 点击show reference按钮 self.LE.ref_screenshot('/html/body/div[1]', "ref") # reference页面截图 self.LE.test_assert("test", "ref") # 断言 self.LE.runner_end('test_infrastructure_049') if __name__ == '__main__': suite = unittest.TestSuite() # 实例化TestSuite suite.addTest(Test("test_add_02")) # 添加测试用例 suite.addTest(Test("test_add_01")) runner = unittest.TextTestRunner() # 实例化TextTestRunner runner.run(suite) # 传入suite并执行测试用例