Documentation Index Fetch the complete documentation index at: https://intunedhq.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
This function has multiple overloads
Base URL String
Current Page's URL
Anchor Elements
Converts any URL source to an absolute, properly encoded URL. export declare function resolveUrl ( input : {
url : string ;
baseUrl : string ;
}) : Promise < string >;
Combines a relative URL with a base URL string. Use when you have an explicit base URL string to resolve relative paths against. Examples Resolve from Base URL String
import { resolveUrl } from "@intuned/browser" ;
import { BrowserContext , Page } from "playwright" ;
interface Params {}
export default async function handler (
params : Params ,
page : Page ,
context : BrowserContext
) {
// Resolve from base URL string
const absoluteUrl = await resolveUrl ({
url: "/lists/table" ,
baseUrl: "https://sandbox.intuned.dev" ,
});
// Returns: "https://sandbox.intuned.dev/lists/table"
console . log ( absoluteUrl );
return absoluteUrl ;
}
Arguments Configuration object with different properties based on the overload The relative or absolute URL to resolve
Base URL string to resolve relative URLs against
Converts any URL source to an absolute, properly encoded URL. export declare function resolveUrl ( input : {
url : string ;
page : Page ;
}) : Promise < string >;
Uses the current page’s URL as the base URL. Use when resolving URLs relative to the current page. Examples Resolve from the Current Page's URL
import { resolveUrl } from "@intuned/browser" ;
import { BrowserContext , Page } from "playwright" ;
interface Params {}
export default async function handler (
params : Params ,
page : Page ,
context : BrowserContext
) {
await page . goto ( "https://sandbox.intuned.dev/" );
// Resolve from the current page's URL
const absoluteUrl = await resolveUrl ({
url: "/lists/table" ,
page: page ,
});
// Returns: "https://sandbox.intuned.dev/lists/table"
console . log ( absoluteUrl );
return absoluteUrl ;
}
Arguments Configuration object with different properties based on the overload The relative or absolute URL to resolve
Playwright Page object to extract base URL from. The current page URL will be used as the base URL
Converts any URL source to an absolute, properly encoded URL. export declare function resolveUrl ( input : { url : Locator }) : Promise < string >;
Extracts the href attribute from a Playwright Locator pointing to an anchor element. Use when extracting and resolving URLs from anchor (<a>) elements. Examples Resolve from Anchor Element
import { resolveUrl } from "@intuned/browser" ;
import { BrowserContext , Page } from "playwright" ;
interface Params {}
export default async function handler (
params : Params ,
page : Page ,
context : BrowserContext
) {
await page . goto ( "https://sandbox.intuned.dev/" );
// Resolve from Anchor Element
const absoluteUrl = await resolveUrl ({
url: page . locator ( "xpath=//a[normalize-space()='Steps Form']" ),
});
// Returns: "https://sandbox.intuned.dev/steps-form"
console . log ( absoluteUrl );
return absoluteUrl ;
}
Arguments Configuration object with different properties based on the overload Playwright Locator pointing to an anchor element. The href attribute will be extracted and resolved relative to the current page.
Returns: Promise<string>
Promise that resolves to the absolute, properly encoded URL string