use 'click' for radio button (#506)
This commit is contained in:
@@ -79,6 +79,22 @@ class SkyvernElement:
|
||||
or (tag_name == "input" and "select2-input" in element_class)
|
||||
)
|
||||
|
||||
async def is_checkbox(self) -> bool:
|
||||
tag_name = self.get_tag_name()
|
||||
if tag_name != "input":
|
||||
return False
|
||||
|
||||
button_type = await self.get_attr("type")
|
||||
return button_type == "checkbox"
|
||||
|
||||
async def is_radio(self) -> bool:
|
||||
tag_name = self.get_tag_name()
|
||||
if tag_name != "input":
|
||||
return False
|
||||
|
||||
button_type = await self.get_attr("type")
|
||||
return button_type == "radio"
|
||||
|
||||
def get_tag_name(self) -> str:
|
||||
return self.__static_element.get("tagName", "")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user