-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* need to actually move to act to page now * move act -> page * fix e2e * fix tests * readme * changeset * package json and changeset * don't fail on combo evals
- Loading branch information
Showing
9 changed files
with
261 additions
and
195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@browserbasehq/stagehand": patch | ||
--- | ||
|
||
Move stagehand.act() -> stagehand.page.act() and deprecate stagehand.act() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -209,6 +209,9 @@ This constructor is used to create an instance of Stagehand. | |
|
||
`act()` allows Stagehand to interact with a web page. Provide an `action` like `"search for 'x'"`, or `"select the cheapest flight presented"` (small atomic goals perform the best). | ||
|
||
> [!NOTE] | ||
> `act()` on the Stagehand instance is deprecated and will be removed in the next major version. Use `stagehand.page.act()` instead. | ||
- **Arguments:** | ||
|
||
- `action`: a `string` describing the action to perform | ||
|
@@ -229,18 +232,18 @@ This constructor is used to create an instance of Stagehand. | |
|
||
```javascript | ||
// Basic usage | ||
await stagehand.act({ action: "click on add to cart" }); | ||
await stagehand.page.act({ action: "click on add to cart" }); | ||
|
||
// Using variables | ||
await stagehand.act({ | ||
await stagehand.page.act({ | ||
action: "enter %username% into the username field", | ||
variables: { | ||
username: "[email protected]", | ||
}, | ||
}); | ||
|
||
// Multiple variables | ||
await stagehand.act({ | ||
await stagehand.page.act({ | ||
action: "fill in the form with %username% and %password%", | ||
variables: { | ||
username: "john.doe", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.