support react select (#652)

This commit is contained in:
LawyZheng
2024-07-27 01:32:35 +08:00
committed by GitHub
parent be75055fd8
commit 1629d84375
5 changed files with 197 additions and 0 deletions

View File

@@ -150,6 +150,11 @@ class SkyvernFrame:
js_script = "async (element) => await getSelect2Options(element)"
return await self.frame.evaluate(js_script, element)
async def get_react_select_options(self, element: ElementHandle) -> List[Dict[str, Any]]:
await self.frame.evaluate(JS_FUNCTION_DEFS)
js_script = "async (element) => await getReactSelectOptions(element)"
return await self.frame.evaluate(js_script, element)
async def get_combobox_options(self, element: ElementHandle) -> List[Dict[str, Any]]:
await self.frame.evaluate(JS_FUNCTION_DEFS)
js_script = "async (element) => await getListboxOptions(element)"