Skip to content

Commit 078ab5c

Browse files
feat: [STG-1798] feat: support Browserbase verified sessions
1 parent 9463fa4 commit 078ab5c

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 8
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-7773ef4ca29c983daafb787ee918cfa6b5b12c5bbdc088308653f2737c26e51f.yml
3-
openapi_spec_hash: 47fc8f2540be0b6374e4230c021072d9
4-
config_hash: 0cc516caf1432087f40654336e0fa8cd
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/browserbase%2Fstagehand-a8db51c6460b3daff67b35262517848a0d4e783c6805c2edd531b155a5db71dd.yml
3+
openapi_spec_hash: c6e7127f211f946673d6389e1d8db1ba
4+
config_hash: a962ae71493deb11a1c903256fb25386

src/stagehand/types/session_start_params.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,10 @@ class BrowserbaseSessionCreateParamsBrowserSettings(TypedDict, total=False):
193193

194194
block_ads: Annotated[bool, PropertyInfo(alias="blockAds")]
195195

196+
captcha_image_selector: Annotated[str, PropertyInfo(alias="captchaImageSelector")]
197+
198+
captcha_input_selector: Annotated[str, PropertyInfo(alias="captchaInputSelector")]
199+
196200
context: BrowserbaseSessionCreateParamsBrowserSettingsContext
197201

198202
extension_id: Annotated[str, PropertyInfo(alias="extensionId")]
@@ -201,10 +205,14 @@ class BrowserbaseSessionCreateParamsBrowserSettings(TypedDict, total=False):
201205

202206
log_session: Annotated[bool, PropertyInfo(alias="logSession")]
203207

208+
os: Literal["windows", "mac", "linux", "mobile", "tablet"]
209+
204210
record_session: Annotated[bool, PropertyInfo(alias="recordSession")]
205211

206212
solve_captchas: Annotated[bool, PropertyInfo(alias="solveCaptchas")]
207213

214+
verified: bool
215+
208216
viewport: BrowserbaseSessionCreateParamsBrowserSettingsViewport
209217

210218

tests/api_resources/test_sessions.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -891,6 +891,8 @@ def test_method_start_with_all_params(self, client: Stagehand) -> None:
891891
"browser_settings": {
892892
"advanced_stealth": True,
893893
"block_ads": True,
894+
"captcha_image_selector": "captchaImageSelector",
895+
"captcha_input_selector": "captchaInputSelector",
894896
"context": {
895897
"id": "id",
896898
"persist": True,
@@ -910,8 +912,10 @@ def test_method_start_with_all_params(self, client: Stagehand) -> None:
910912
},
911913
},
912914
"log_session": True,
915+
"os": "windows",
913916
"record_session": True,
914917
"solve_captchas": True,
918+
"verified": True,
915919
"viewport": {
916920
"height": 0,
917921
"width": 0,
@@ -1840,6 +1844,8 @@ async def test_method_start_with_all_params(self, async_client: AsyncStagehand)
18401844
"browser_settings": {
18411845
"advanced_stealth": True,
18421846
"block_ads": True,
1847+
"captcha_image_selector": "captchaImageSelector",
1848+
"captcha_input_selector": "captchaInputSelector",
18431849
"context": {
18441850
"id": "id",
18451851
"persist": True,
@@ -1859,8 +1865,10 @@ async def test_method_start_with_all_params(self, async_client: AsyncStagehand)
18591865
},
18601866
},
18611867
"log_session": True,
1868+
"os": "windows",
18621869
"record_session": True,
18631870
"solve_captchas": True,
1871+
"verified": True,
18641872
"viewport": {
18651873
"height": 0,
18661874
"width": 0,

0 commit comments

Comments
 (0)