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/category.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ async def automation(
This function collects category metadata (name, url) from the main menu
and then uses extend_payload to trigger individual scrapes for each category's products.
"""
await page.set_viewport_size({"width": 1280, "height": 800})
params = EcommereceCategoryParams(**params)
if not params.store_url:
raise ValueError("store_url is required in params")
Expand Down
1 change: 0 additions & 1 deletion typescript-examples/e-commerce-nested/api/category.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ async function handler(
page: Page,
context: BrowserContext
): Promise<{ categories: Category[] }> {
await page.setViewportSize({ width: 1280, height: 800 });

if (!params || !params.store_url) {
throw new Error("store_url is required in params");
Expand Down
2 changes: 1 addition & 1 deletion typescript-examples/e-commerce-nested/api/details.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ async function handler(
page: Page,
context: BrowserContext
): Promise<ProductDetails> {
await page.setViewportSize({ width: 1280, height: 800 });


if (!params || !params.details_url) {
throw new Error("Params with details_url are required for this automation");
Expand Down
2 changes: 0 additions & 2 deletions typescript-examples/e-commerce-nested/api/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,6 @@ async function handler(
page: Page,
context: BrowserContext
): Promise<{ category: string; products: Product[] }> {
await page.setViewportSize({ width: 1280, height: 800 });

if (!params || !params.category_url) {
throw new Error("category_url is required in params");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,6 @@ export default async function handler(
page: Page,
context: BrowserContext
): Promise<ProductDetails> {
await page.setViewportSize({ width: 1280, height: 800 });

const { name: paramName, details_url } = detailsParamsSchema.parse(params);

Expand Down
1 change: 0 additions & 1 deletion typescript-examples/hybrid-automation/api/scraper/list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ export default async function handler(
page: Page,
context: BrowserContext
) {
await page.setViewportSize({ width: 1280, height: 800 });

const { category_name, category_url } = listParamsSchema.parse(params);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,7 @@ export default async function handler(
page: Page,
context: BrowserContext
) {
// 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.setViewportSize({
width: 1080,
height: 720,
});


// Step 1: Validate input parameters using schema
// This ensures all required fields are present and properly formatted
const validatedParams = bookConsultationSchema.parse(params);
Expand Down
7 changes: 0 additions & 7 deletions typescript-examples/rpa-example/api/book-consultations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,6 @@ export default async function handler(
page: Page,
context: BrowserContext
): Promise<BookingResult> {
// 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.setViewportSize({
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 @@ -71,7 +71,6 @@ export default async function handler(
await stagehand.init();
console.log("\nInitialized 🤘 Stagehand");
// Validate parameters
await page.setViewportSize({ width: 1280, height: 800 });
const validatedParams = listParametersSchema.parse(params);

const { metadata, applicant, address, vehicle } = validatedParams;
Expand Down
5 changes: 0 additions & 5 deletions typescript-examples/starter-auth/api/sample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ export default async function handler(
page: Page,
context: BrowserContext
) {
await page.setViewportSize({
width: 1080,
height: 720,
});

const sandboxedUrl = "https://sandbox.intuned.dev/consultations-auth/book";

await goToUrl({
Expand Down
Loading