diff --git a/cases/smoke/basic/screenshot32/new_script/conftest.py b/cases/smoke/basic/screenshot32/new_script/conftest.py index a3e7244ae72051ccf7747cc62079b8553634f5ab..e5dd4d845306ca6310e1a5db0b7b062990032ada 100644 --- a/cases/smoke/basic/screenshot32/new_script/conftest.py +++ b/cases/smoke/basic/screenshot32/new_script/conftest.py @@ -42,15 +42,15 @@ def setup_teardown(request, device): if device.get_focus_window() == 'SystemDialog1': device.click(360, 800) time.sleep(2) - if device.get_focus_window() == 'SystemDialog1': - rst = self.hdc_shell(f'ps -ef | grep -w com.ohos.systemui | grep -v grep') - rst_list = rst.split() - logging.info(f'Process ID: {rst_list[1]}') - device.hdc_shell(f'kill -9 {rst_list[1]}') - #device.click(595, 555) - time.sleep(5) - device.unlock() - #device.click(360, 800) + #if device.get_focus_window() == 'SystemDialog1': + # rst = self.hdc_shell(f'ps -ef | grep -w com.ohos.systemui | grep -v grep') + # rst_list = rst.split() + # logging.info(f'Process ID: {rst_list[1]}') + # device.hdc_shell(f'kill -9 {rst_list[1]}') + # #device.click(595, 555) + # time.sleep(5) + # device.unlock() + device.click(360, 1245) time.sleep(1) #device.click(360, 1245) diff --git a/cases/smoke/basic/screenshot32/new_script/testcases/test_launcher.py b/cases/smoke/basic/screenshot32/new_script/testcases/test_launcher.py index 1b6cf0a6fe2f14353dc82168befee56f62b98159..07af60fafbb7aac88d27889bcf35dbfb0ebb68d4 100644 --- a/cases/smoke/basic/screenshot32/new_script/testcases/test_launcher.py +++ b/cases/smoke/basic/screenshot32/new_script/testcases/test_launcher.py @@ -14,17 +14,19 @@ class Test: def test(self, setup_teardown, device): logging.info('compare image similarity') # usb弹窗 - device.unlock() - time.sleep(2) - #device.click(595, 555) - #time.sleep(10) - device.click(360, 1245) - #device.unlock() - time.sleep(2) - #if device.get_focus_window() == 'SystemDialog1': - # device.click(595, 555) - # time.sleep(10) + + if device.get_focus_window() == 'SystemDialog1': + rst = self.hdc_shell(f'ps -ef | grep -w com.ohos.systemui | grep -v grep') + rst_list = rst.split() + logging.info(f'Process ID: {rst_list[1]}') + device.hdc_shell(f'kill -9 {rst_list[1]}') + # device.click(595, 555) + time.sleep(5) + device.unlock() + + device.click(360, 1245) + time.sleep(1) #if device.get_focus_window() == 'SystemDialog1': # device.click(360, 800) # time.sleep(10)