docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
A utility module for automated testing of location-sensitive web applications that need to verify behavior across different geographical locations and timezones.
/**
* Sets the geolocation for a browser page.
*
* @param page - The browser page to configure
* @param latitude - Latitude coordinate (-90 to 90)
* @param longitude - Longitude coordinate (-180 to 180)
* @param accuracy - Optional accuracy in meters (default: 0)
*/
export async function setGeolocation(
page: any,
latitude: number,
longitude: number,
accuracy?: number
): Promise<void>;
/**
* Sets the timezone for a browser page.
*
* @param page - The browser page to configure
* @param timezoneId - IANA timezone identifier (e.g., "America/New_York", "Asia/Tokyo")
*/
export async function setTimezone(
page: any,
timezoneId: string
): Promise<void>;
/**
* Launches a browser with both geolocation and timezone pre-configured.
* Returns a browser instance with the specified settings.
*
* @param latitude - Latitude coordinate
* @param longitude - Longitude coordinate
* @param timezoneId - IANA timezone identifier
* @param accuracy - Optional accuracy in meters (default: 0)
* @returns Browser instance with configured settings
*/
export async function launchWithLocation(
latitude: number,
longitude: number,
timezoneId: string,
accuracy?: number
): Promise<any>;Provides browser automation and environment emulation support.