bugfix (#2254)
This commit is contained in:
@@ -732,7 +732,7 @@ async def handle_input_text_action(
|
|||||||
option=SelectOption(label=text),
|
option=SelectOption(label=text),
|
||||||
intention=action.intention,
|
intention=action.intention,
|
||||||
)
|
)
|
||||||
if skyvern_element.get_selectable():
|
if await skyvern_element.get_selectable():
|
||||||
LOG.info(
|
LOG.info(
|
||||||
"Input element is selectable, doing select actions",
|
"Input element is selectable, doing select actions",
|
||||||
task_id=task.task_id,
|
task_id=task.task_id,
|
||||||
|
|||||||
@@ -275,7 +275,7 @@ class SkyvernElement:
|
|||||||
return disabled or aria_disabled or style_disabled
|
return disabled or aria_disabled or style_disabled
|
||||||
|
|
||||||
async def is_selectable(self) -> bool:
|
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:
|
async def is_visible(self, must_visible_style: bool = True) -> bool:
|
||||||
if not await self.get_locator().count():
|
if not await self.get_locator().count():
|
||||||
@@ -300,9 +300,9 @@ class SkyvernElement:
|
|||||||
def get_element_dict(self) -> dict:
|
def get_element_dict(self) -> dict:
|
||||||
return self.__static_element
|
return self.__static_element
|
||||||
|
|
||||||
def get_selectable(self) -> bool:
|
async def get_selectable(self) -> bool:
|
||||||
if self.get_tag_name() == InteractiveElement.INPUT:
|
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":
|
if input_type == "select-one" or input_type == "select-multiple":
|
||||||
return True
|
return True
|
||||||
return self._selectable
|
return self._selectable
|
||||||
|
|||||||
Reference in New Issue
Block a user