convert css shape to string (#1092)

This commit is contained in:
LawyZheng
2024-10-31 00:12:13 +08:00
committed by GitHub
parent 01fbdeece4
commit 8762865a0b
7 changed files with 198 additions and 16 deletions

View File

@@ -162,6 +162,10 @@ class SkyvernFrame:
js_script = "(element) => isElementVisible(element) && !isHidden(element)"
return await self.frame.evaluate(js_script, element)
async def get_disabled_from_style(self, element: ElementHandle) -> bool:
js_script = "(element) => checkDisabledFromStyle(element)"
return await self.frame.evaluate(js_script, element)
async def scroll_to_top(self, draw_boxes: bool) -> float:
"""
Scroll to the top of the page and take a screenshot.