diff --git a/case/test_dde_1271331.py b/case/test_dde_1271331.py new file mode 100644 index 0000000000000000000000000000000000000000..a7f410fe88dde09c89b2199a3b49f31ae11877a3 --- /dev/null +++ b/case/test_dde_1271331.py @@ -0,0 +1,22 @@ +import time +import pylinuxauto +from case.base_case import BaseCase +from method.dde_terminal_method import DdeTerminalMethod +from method.dde_method import DdeMethod + +class TestDdeCase(BaseCase): + def test_dde_1271331(self): + """桌面-右键菜单-在终端中打开""" + pylinuxauto.hot_key('win', 'd') + time.sleep(2) + euler = DdeTerminalMethod() + euler.dde_terminal_method__right_click_by_xy() + time.sleep(2) + + self.assert_ocr_exist("uos@") + + def teardown_method(self): + """关闭窗口""" + DdeMethod().dde_method_close_window() + time.sleep(2) + diff --git a/dde.csv b/dde.csv index 1756ed000e715f02548aec3431a80295f9c6ed76..548453ed1a43c1cb8b146c39252124b86af8625c 100644 --- a/dde.csv +++ b/dde.csv @@ -26,4 +26,5 @@ 1271313,,, 1271315,,, 1271317,,, -1271327,,, \ No newline at end of file +1271327,,, +1271331,,, \ No newline at end of file diff --git a/method/dde_terminal_method.py b/method/dde_terminal_method.py new file mode 100644 index 0000000000000000000000000000000000000000..80088e1b2745fef53aaf083682cc04c2c01ba8f1 --- /dev/null +++ b/method/dde_terminal_method.py @@ -0,0 +1,13 @@ +from time import sleep +from funnylog2.config import config as funnylog2_config + +funnylog2_config.CLASS_NAME_ENDSWITH = ["Method"] +import pylinuxauto +from method.base_method import BaseMethod + + +class DdeTerminalMethod(BaseMethod): + def dde_terminal_method__right_click_by_xy(self): + """通过右键点击【在终端中打开】""" + pylinuxauto.right_click(960, 540) + self.base_method_click_by_ocr("在终端中打开") \ No newline at end of file