代码优化
This commit is contained in:
parent
5d8d6ab210
commit
a3e9d59474
|
@ -91,8 +91,13 @@ class BasicPage:
|
|||
:rollback: 是否将元素回滚
|
||||
:return: None
|
||||
"""
|
||||
self.driver.execute_script("arguments[0].setAttribute('style', 'background: yellow; border: 2px solid red;');",
|
||||
element)
|
||||
try:
|
||||
self.driver.execute_script(
|
||||
"arguments[0].setAttribute('style', 'background: yellow; border: 2px solid red;');",
|
||||
element)
|
||||
except Exception as e:
|
||||
Log.info(f"无法染色染色失效:{e}")
|
||||
pass
|
||||
|
||||
def __wait_element_visible(self, model: str, locator: tuple) -> None:
|
||||
"""
|
||||
|
|
Loading…
Reference in New Issue