From 886f977311eae5ae6f0e6cced246b34ac260e021 Mon Sep 17 00:00:00 2001 From: Eric Date: Mon, 18 Sep 2023 11:14:20 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BF=AE=E5=A4=8D=20chrome=20=E9=83=A8?= =?UTF-8?q?=E5=88=86=E5=85=83=E7=B4=A0=E5=AE=9A=E4=BD=8D=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/terminal/applets/chrome/ChangeLog | 4 ++++ apps/terminal/applets/chrome/app.py | 2 +- apps/terminal/applets/chrome/manifest.yml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/terminal/applets/chrome/ChangeLog b/apps/terminal/applets/chrome/ChangeLog index bf3a44655..9439008bc 100644 --- a/apps/terminal/applets/chrome/ChangeLog +++ b/apps/terminal/applets/chrome/ChangeLog @@ -1,3 +1,7 @@ +#2023-09-18 Version 1.0 +## Bug 修复 + - 移除窗口最小化,避免造成部分页面元素定位失败 + # 2023-09-04 Version 0.9 ## 功能优化 - 进度条显示最大超时 diff --git a/apps/terminal/applets/chrome/app.py b/apps/terminal/applets/chrome/app.py index 92ddd1e7c..d9ae97210 100644 --- a/apps/terminal/applets/chrome/app.py +++ b/apps/terminal/applets/chrome/app.py @@ -258,11 +258,11 @@ class AppletApplication(BaseApplication): self.driver = webdriver.Chrome(options=self._chrome_options, service=service) self.driver.implicitly_wait(10) if self.app.asset.address != "": - self.driver.minimize_window() ok = self.app.execute(self.driver) if not ok: print("执行失败") self.driver.maximize_window() + def wait(self): disconnected_msg = "Unable to evaluate script: disconnected: not connected to DevTools\n" closed_msg = "Unable to evaluate script: no such window: target window already closed" diff --git a/apps/terminal/applets/chrome/manifest.yml b/apps/terminal/applets/chrome/manifest.yml index 8e648831c..26864111d 100644 --- a/apps/terminal/applets/chrome/manifest.yml +++ b/apps/terminal/applets/chrome/manifest.yml @@ -1,6 +1,6 @@ name: chrome display_name: "{{ 'Chrome Browser' | trans }}" -version: 0.9 +version: 1.0 comment: "{{ 'Chrome Browser Open URL Page Address' | trans }}" author: JumpServer Team exec_type: python