> ## 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.

# resolve_url

> [!NOTE]
>
> This function has multiple overloads

> [tab] Base URL String
>
> Converts any URL source to an absolute, properly encoded URL.
>
> ```python theme={null}
> async def resolve_url(
>     *,
>     url: str,
>     base_url: str,
> ) -> str
> ```
>
> Combines a relative URL with a base URL string. Use when you have an explicit base URL string to resolve relative paths against.
>
> ## Examples
>
> ```python Resolve from Base URL String theme={null}
> from typing import TypedDict
> from playwright.async_api import Page
> from intuned_browser import resolve_url
> class Params(TypedDict):
>     pass
> async def automation(page: Page, params: Params, **_kwargs):
>     # Resolve from base URL string
>     absolute_url = await resolve_url(
>         url="/lists/table",
>         base_url="https://sandbox.intuned.dev"
>     )
>     # Returns: "https://sandbox.intuned.dev/lists/table"
>     print(absolute_url)
>     return absolute_url
> ```
>
> ## Arguments
>
> **url** `str` *required*
>
> The relative or absolute URL to resolve.
>
> **base\_url** `str` *required*
>
> Base URL string to resolve relative URLs against.

> [tab] Current Page's URL
>
> Converts any URL source to an absolute, properly encoded URL.
>
> ```python theme={null}
> async def resolve_url(
>     *,
>     url: str,
>     page: Page,
> ) -> str
> ```
>
> Uses the current page's URL as the base URL. Use when resolving URLs relative to the current page.
>
> ## Examples
>
> ```python Resolve from the Current Page's URL theme={null}
> from typing import TypedDict
> from playwright.async_api import Page
> from intuned_browser import resolve_url
> class Params(TypedDict):
>     pass
> async def automation(page: Page, params: Params, **_kwargs):
>     await page.goto("https://sandbox.intuned.dev/")
>     # Resolve from the current page's URL
>     absolute_url = await resolve_url(
>         url="/lists/table",
>         page=page
>     )
>     # Returns: "https://sandbox.intuned.dev/lists/table"
>     print(absolute_url)
>     return absolute_url
> ```
>
> ## Arguments
>
> **url** `str` *required*
>
> The relative or absolute URL to resolve.
>
> **page** `Page` *required*
>
> Playwright Page object to extract base URL from. The current page URL will be used as the base URL.

> [tab] Anchor Elements
>
> Converts any URL source to an absolute, properly encoded URL.
>
> ```python theme={null}
> async def resolve_url(
>     *,
>     url: Locator,
> ) -> str
> ```
>
> Extracts the href attribute from a Playwright Locator pointing to an anchor element. Use when extracting and resolving URLs from anchor (`<a>`) elements.
>
> ## Examples
>
> ```python Resolve from Anchor Element theme={null}
> from typing import TypedDict
> from playwright.async_api import Page
> from intuned_browser import resolve_url
> class Params(TypedDict):
>     pass
> async def automation(page: Page, params: Params, **_kwargs):
>     await page.goto("https://sandbox.intuned.dev/")
>     # Resolve from Anchor Element
>     absolute_url = await resolve_url(
>         url=page.locator("xpath=//a[normalize-space()='Steps Form']"),
>     )
>     # Returns: "https://sandbox.intuned.dev/steps-form"
>     print(absolute_url)
>     return absolute_url
> ```
>
> ## Arguments
>
> **url** `Locator` *required*
>
> Playwright Locator pointing to an anchor element. The href attribute will be extracted and resolved relative to the current page.

## Returns: `str`

The absolute, properly encoded URL string


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.