fix upload file issue (#3962)

This commit is contained in:
LawyZheng
2025-11-11 23:24:48 +08:00
committed by GitHub
parent b9adde24bd
commit f038b281c1
2 changed files with 29 additions and 5 deletions

View File

@@ -620,6 +620,13 @@ class SkyvernElement:
index += 1
return None
async def find_file_input_in_children(self) -> Locator | None:
"""Sometime the file input is invisible on the page, so it won't exist in the element tree, but it can be found in the DOM."""
locator = self.get_locator().locator('input[type="file"]')
if await locator.count() != 1:
return None
return locator
async def get_attr(
self,
attr_name: str,