mirror of
https://github.com/Skyvern-AI/skyvern.git
synced 2026-04-28 03:30:10 +00:00
action.get_xpath (#2642)
Some checks failed
Run tests and pre-commit / Run tests and pre-commit hooks (push) Waiting to run
Run tests and pre-commit / Frontend Lint and Build (push) Waiting to run
Publish Fern Docs / run (push) Waiting to run
Sync to skyvern-cloud / sync (push) Waiting to run
Run n8n package CI / test (push) Has been cancelled
Some checks failed
Run tests and pre-commit / Run tests and pre-commit hooks (push) Waiting to run
Run tests and pre-commit / Frontend Lint and Build (push) Waiting to run
Publish Fern Docs / run (push) Waiting to run
Sync to skyvern-cloud / sync (push) Waiting to run
Run n8n package CI / test (push) Has been cancelled
This commit is contained in:
parent
f121ce0ce6
commit
311e641908
1 changed files with 7 additions and 0 deletions
|
|
@ -168,6 +168,13 @@ class Action(BaseModel):
|
|||
else:
|
||||
raise ValueError("Invalid action data")
|
||||
|
||||
def get_xpath(self) -> str | None:
|
||||
if not self.skyvern_element_data:
|
||||
return None
|
||||
if "xpath" in self.skyvern_element_data:
|
||||
return self.skyvern_element_data["xpath"]
|
||||
return None
|
||||
|
||||
|
||||
class WebAction(Action):
|
||||
element_id: Annotated[str, Field(coerce_numbers_to_str=True)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue