Skip to main content

goToPage

codebolt.browser.goToPage(url: string): Promise<GoToPageResponse>
Navigates to a specified URL.

Parameters

NameTypeDescription
urlstringThe URL to navigate to.

Returns:

 Promise<GoToPageResponse>
A promise that resolves when navigation is complete.

Example


//Navigate to a webpage using Codebolt's browser API
await codebolt.browser.goToPage('https://docs.codebolt.ai/docs/api/browser/goToPage/')


Explanation

browser The codebolt.browser.goToPage(url) function is used to navigate the browser to a new web page specified by the URL provided. When this function is called, the browser leaves the current page and loads the new page indicated by the URL.