File tree 3 files changed +23
-1
lines changed
3 files changed +23
-1
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @browserbasehq/stagehand " : patch
3
+ ---
4
+
5
+ Adding back useAccessibilityTree param to observe with a deprecation warning/error indicating to use onlyVisible instead
Original file line number Diff line number Diff line change @@ -504,8 +504,24 @@ export class StagehandPage {
504
504
domSettleTimeoutMs,
505
505
returnAction = false ,
506
506
onlyVisible = false ,
507
+ useAccessibilityTree,
507
508
} = options ;
508
509
510
+ if ( useAccessibilityTree !== undefined ) {
511
+ this . stagehand . log ( {
512
+ category : "deprecation" ,
513
+ message :
514
+ "useAccessibilityTree is deprecated.\n" +
515
+ " To use accessibility tree as context:\n" +
516
+ " 1. Set onlyVisible to false (default)\n" +
517
+ " 2. Don't declare useAccessibilityTree" ,
518
+ level : 1 ,
519
+ } ) ;
520
+ throw new Error (
521
+ "useAccessibilityTree is deprecated. Use onlyVisible instead." ,
522
+ ) ;
523
+ }
524
+
509
525
if ( typeof useVision !== "undefined" ) {
510
526
this . stagehand . log ( {
511
527
category : "deprecation" ,
Original file line number Diff line number Diff line change @@ -91,13 +91,14 @@ export interface ObserveOptions {
91
91
domSettleTimeoutMs ?: number ;
92
92
returnAction ?: boolean ;
93
93
onlyVisible ?: boolean ;
94
+ /** @deprecated `useAccessibilityTree` is now deprecated. Use `onlyVisible` instead. */
95
+ useAccessibilityTree ?: boolean ;
94
96
}
95
97
96
98
export interface ObserveResult {
97
99
selector : string ;
98
100
description : string ;
99
101
backendNodeId ?: number ;
100
- //TODO: review name
101
102
method ?: string ;
102
103
arguments ?: string [ ] ;
103
104
}
You can’t perform that action at this time.
0 commit comments