This commit is contained in:
Shuchang Zheng
2025-04-30 13:27:30 +08:00
committed by GitHub
parent 56f0666685
commit 0eff92632c
2 changed files with 4 additions and 4 deletions

View File

@@ -732,7 +732,7 @@ async def handle_input_text_action(
option=SelectOption(label=text),
intention=action.intention,
)
if skyvern_element.get_selectable():
if await skyvern_element.get_selectable():
LOG.info(
"Input element is selectable, doing select actions",
task_id=task.task_id,

View File

@@ -275,7 +275,7 @@ class SkyvernElement:
return disabled or aria_disabled or style_disabled
async def is_selectable(self) -> bool:
return self.get_selectable() or self.get_tag_name() in SELECTABLE_ELEMENT
return await self.get_selectable() or self.get_tag_name() in SELECTABLE_ELEMENT
async def is_visible(self, must_visible_style: bool = True) -> bool:
if not await self.get_locator().count():
@@ -300,9 +300,9 @@ class SkyvernElement:
def get_element_dict(self) -> dict:
return self.__static_element
def get_selectable(self) -> bool:
async def get_selectable(self) -> bool:
if self.get_tag_name() == InteractiveElement.INPUT:
input_type = self.get_attr("type", mode="static")
input_type = await self.get_attr("type", mode="static")
if input_type == "select-one" or input_type == "select-multiple":
return True
return self._selectable