input type button (#1073)

This commit is contained in:
LawyZheng
2024-10-28 23:52:26 +08:00
committed by GitHub
parent 8e8f41d3b6
commit 64def7c2a6
2 changed files with 25 additions and 0 deletions

View File

@@ -167,6 +167,14 @@ class SkyvernElement:
button_type = await self.get_attr("type")
return button_type == "radio"
async def is_btn_input(self) -> bool:
tag_name = self.get_tag_name()
if tag_name != InteractiveElement.INPUT:
return False
input_type = await self.get_attr("type")
return input_type == "button"
async def is_raw_input(self) -> bool:
if self.get_tag_name() != InteractiveElement.INPUT:
return False