Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion python-examples/e-commerce-nested/api/details.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ async def automation(
"details_url": "https://www.example.com/product/item-1"
}
"""
await page.set_viewport_size({"width": 1280, "height": 800})
params = EcommereceDetailsParams(**params)
if not params.details_url:
raise ValueError("Params with details_url are required for this automation")
Expand Down
1 change: 0 additions & 1 deletion python-examples/e-commerce-nested/api/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ async def automation(
then extracts product metadata (name, price, details_url) and uses
extend_payload to trigger individual scrapes for each product's details.
"""
await page.set_viewport_size({"width": 1280, "height": 800})
params = EcommereceListParams(**params)
if not params.category_url:
raise ValueError("category_url is required in params")
Expand Down
1 change: 0 additions & 1 deletion python-examples/hybrid-automation/api/scraper/details.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,6 @@ async def automation(
"details_url": "https://www.example.com/product/item-1"
}
"""
await page.set_viewport_size({"width": 1280, "height": 800})
params = EcommereceDetailsParams(**params)
if not params.details_url:
raise ValueError("Params with details_url are required for this automation")
Expand Down
1 change: 0 additions & 1 deletion python-examples/hybrid-automation/api/scraper/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ async def automation(
then extracts product metadata (name, price, details_url) and uses
extend_payload to trigger individual scrapes for each product's details.
"""
await page.set_viewport_size({"width": 1280, "height": 800})
params = EcommereceListParams(**params)
if not params.category_url:
raise ValueError("category_url is required in params")
Expand Down
6 changes: 1 addition & 5 deletions python-examples/rpa-auth-example/api/book-consultations.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,7 @@ async def automation(
context: BrowserContext | None = None,
**_kwargs,
) -> dict:
# Set the browser viewport size to 1080x720 pixels
# This ensures consistent rendering across different devices and screen sizes
# Some websites may display different layouts or elements based on viewport size
await page.set_viewport_size({"width": 1080, "height": 720})


# Step 1: Validate input parameters using schema
# This ensures all required fields are present and properly formatted
if params is None:
Expand Down
4 changes: 0 additions & 4 deletions python-examples/rpa-example/api/book-consultations.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ async def automation(
context: BrowserContext | None = None,
**_kwargs,
) -> dict:
# Set the browser viewport size to 1080x720 pixels
# This ensures consistent rendering across different devices and screen sizes
# Some websites may display different layouts or elements based on viewport size
await page.set_viewport_size({"width": 1080, "height": 720})

# Step 1: Validate input parameters using schema
# This ensures all required fields are present and properly formatted
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ async def automation(page: Page, params: ListParameters, *args: ..., **kwargs: .
session_id = session.data.session_id
print(f"✅ Session started: {session_id}")
print("\nInitialized 🤘 Stagehand")
await page.set_viewport_size({"width": 1280, "height": 800})

async def perform_action(page: Page, instruction: str) -> None:
for _ in range(3):
Expand Down
2 changes: 0 additions & 2 deletions python-examples/stagehand/api/get-books.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ async def automation(page: Page, params: Params, **_kwargs):
print(f"✅ Session started: {session_id}")
print("\nInitialized 🤘 Stagehand")

await page.set_viewport_size({"width": 1280, "height": 800})

category = params.get("category")
all_books: list[BookDetails] = []

Expand Down
2 changes: 0 additions & 2 deletions python-examples/starter-auth/api/sample.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ class Params(TypedDict):


async def automation(page: Page, params: Params | None = None, **_kwargs):
await page.set_viewport_size({"width": 1080, "height": 720})

sandboxed_url = "https://sandbox.intuned.dev/consultations-auth/book"

await go_to_url(page=page, url=sandboxed_url)
Expand Down
Loading