HttpPage

class HttpPage(delegate: Page, baseUri: Uri) : Page

Custom Page implementation to add convenience functions to the standard Playwright model

Constructors

Link copied to clipboard
constructor(delegate: Page, baseUri: Uri)

Functions

Link copied to clipboard
open override fun addInitScript(script: Path)
open override fun addInitScript(script: String)
Link copied to clipboard
open fun addLocatorHandler(locator: Locator, handler: Consumer<Locator>)
open override fun addLocatorHandler(locator: Locator, handler: Consumer<Locator>, options: Page.AddLocatorHandlerOptions)
Link copied to clipboard
open fun addScriptTag(): ElementHandle
open override fun addScriptTag(options: Page.AddScriptTagOptions): ElementHandle
Link copied to clipboard
open fun addStyleTag(): ElementHandle
open override fun addStyleTag(options: Page.AddStyleTagOptions): ElementHandle
Link copied to clipboard
open override fun bringToFront()
Link copied to clipboard
open fun check(selector: String)
open override fun check(selector: String, options: Page.CheckOptions)
Link copied to clipboard
open fun click(selector: String)
open override fun click(selector: String, options: Page.ClickOptions)
Link copied to clipboard
open override fun clock(): Clock
Link copied to clipboard
open override fun close()
open override fun close(options: Page.CloseOptions)
Link copied to clipboard
open override fun content(): String
Link copied to clipboard
open override fun context(): BrowserContext
Link copied to clipboard
open fun dblclick(selector: String)
open override fun dblclick(selector: String, options: Page.DblclickOptions)
Link copied to clipboard
open fun dispatchEvent(selector: String, type: String)
open fun dispatchEvent(selector: String, type: String, eventInit: Any)
open override fun dispatchEvent(selector: String, type: String, eventInit: Any, options: Page.DispatchEventOptions)
Link copied to clipboard
open fun dragAndDrop(source: String, target: String)
open override fun dragAndDrop(source: String, target: String, options: Page.DragAndDropOptions)
Link copied to clipboard
open fun emulateMedia()
open override fun emulateMedia(options: Page.EmulateMediaOptions)
Link copied to clipboard
open fun evalOnSelector(selector: String, expression: String): Any
open fun evalOnSelector(selector: String, expression: String, arg: Any): Any
open override fun evalOnSelector(selector: String, expression: String, arg: Any, options: Page.EvalOnSelectorOptions): Any
Link copied to clipboard
open fun evalOnSelectorAll(selector: String, expression: String): Any
open override fun evalOnSelectorAll(selector: String, expression: String, arg: Any): Any
Link copied to clipboard
open fun evaluate(expression: String): Any
open override fun evaluate(expression: String, arg: Any): Any
Link copied to clipboard
open fun evaluateHandle(expression: String): JSHandle
open override fun evaluateHandle(expression: String, arg: Any): JSHandle
Link copied to clipboard
open fun exposeBinding(name: String, callback: BindingCallback)
open override fun exposeBinding(name: String, callback: BindingCallback, options: Page.ExposeBindingOptions)
Link copied to clipboard
open override fun exposeFunction(name: String, callback: FunctionCallback)
Link copied to clipboard
open fun fill(selector: String, value: String)
open override fun fill(selector: String, value: String, options: Page.FillOptions)
Link copied to clipboard
open fun focus(selector: String)
open override fun focus(selector: String, options: Page.FocusOptions)
Link copied to clipboard
open override fun frame(name: String): Frame
Link copied to clipboard
open override fun frameByUrl(url: Predicate<String>): Frame
open override fun frameByUrl(url: Pattern): Frame
open override fun frameByUrl(url: String): Frame
Link copied to clipboard
open override fun frameLocator(selector: String): FrameLocator
Link copied to clipboard
open override fun frames(): MutableList<Frame>
Link copied to clipboard
open fun getAttribute(selector: String, name: String): String
open override fun getAttribute(selector: String, name: String, options: Page.GetAttributeOptions): String
Link copied to clipboard
open fun getByAltText(text: Pattern): Locator
open fun getByAltText(text: String): Locator
open override fun getByAltText(text: Pattern, options: Page.GetByAltTextOptions): Locator
open override fun getByAltText(text: String, options: Page.GetByAltTextOptions): Locator
Link copied to clipboard
open fun getByLabel(text: Pattern): Locator
open fun getByLabel(text: String): Locator
open override fun getByLabel(text: Pattern, options: Page.GetByLabelOptions): Locator
open override fun getByLabel(text: String, options: Page.GetByLabelOptions): Locator
Link copied to clipboard
open fun getByPlaceholder(text: Pattern): Locator
open fun getByPlaceholder(text: String): Locator
open override fun getByPlaceholder(text: Pattern, options: Page.GetByPlaceholderOptions): Locator
open override fun getByPlaceholder(text: String, options: Page.GetByPlaceholderOptions): Locator
Link copied to clipboard
open fun getByRole(role: AriaRole): Locator
open override fun getByRole(role: AriaRole, options: Page.GetByRoleOptions): Locator
Link copied to clipboard
open override fun getByTestId(testId: Pattern): Locator
open override fun getByTestId(testId: String): Locator
Link copied to clipboard
open fun getByText(text: Pattern): Locator
open fun getByText(text: String): Locator
open override fun getByText(text: Pattern, options: Page.GetByTextOptions): Locator
open override fun getByText(text: String, options: Page.GetByTextOptions): Locator
Link copied to clipboard
open fun getByTitle(text: Pattern): Locator
open fun getByTitle(text: String): Locator
open override fun getByTitle(text: Pattern, options: Page.GetByTitleOptions): Locator
open override fun getByTitle(text: String, options: Page.GetByTitleOptions): Locator
Link copied to clipboard
open fun goBack(): Response
open override fun goBack(options: Page.GoBackOptions): Response
Link copied to clipboard
open fun goForward(): Response
open override fun goForward(options: Page.GoForwardOptions): Response
Link copied to clipboard
open fun hover(selector: String)
open override fun hover(selector: String, options: Page.HoverOptions)
Link copied to clipboard
open fun innerHTML(selector: String): String
open override fun innerHTML(selector: String, options: Page.InnerHTMLOptions): String
Link copied to clipboard
open fun innerText(selector: String): String
open override fun innerText(selector: String, options: Page.InnerTextOptions): String
Link copied to clipboard
open fun inputValue(selector: String): String
open override fun inputValue(selector: String, options: Page.InputValueOptions): String
Link copied to clipboard
open fun isChecked(selector: String): Boolean
open override fun isChecked(selector: String, options: Page.IsCheckedOptions): Boolean
Link copied to clipboard
open override fun isClosed(): Boolean
Link copied to clipboard
open fun isDisabled(selector: String): Boolean
open override fun isDisabled(selector: String, options: Page.IsDisabledOptions): Boolean
Link copied to clipboard
open fun isEditable(selector: String): Boolean
open override fun isEditable(selector: String, options: Page.IsEditableOptions): Boolean
Link copied to clipboard
open fun isEnabled(selector: String): Boolean
open override fun isEnabled(selector: String, options: Page.IsEnabledOptions): Boolean
Link copied to clipboard
open fun isHidden(selector: String): Boolean
open override fun isHidden(selector: String, options: Page.IsHiddenOptions): Boolean
Link copied to clipboard
open fun isVisible(selector: String): Boolean
open override fun isVisible(selector: String, options: Page.IsVisibleOptions): Boolean
Link copied to clipboard
open override fun keyboard(): Keyboard
Link copied to clipboard
open fun locator(selector: String): Locator
open override fun locator(selector: String, options: Page.LocatorOptions): Locator
Link copied to clipboard
open override fun mainFrame(): Frame
Link copied to clipboard
open override fun mouse(): Mouse
Link copied to clipboard
open override fun navigate(url: String, options: Page.NavigateOptions): Response

open override fun navigate(uri: String): Response

Navigate to a URL. If the scheme is not set, we use the base URL of the http4k application

fun navigate(uri: Uri): Response

Navigates to an arbitrary URL

Link copied to clipboard
fun navigateHome(): Response

Navigates to the base URL of the http4k application

Link copied to clipboard
open override fun offClose(handler: Consumer<Page>)
Link copied to clipboard
open override fun offConsoleMessage(handler: Consumer<ConsoleMessage>)
Link copied to clipboard
open override fun offCrash(handler: Consumer<Page>)
Link copied to clipboard
open override fun offDialog(handler: Consumer<Dialog>)
Link copied to clipboard
open override fun offDOMContentLoaded(handler: Consumer<Page>)
Link copied to clipboard
open override fun offDownload(handler: Consumer<Download>)
Link copied to clipboard
open override fun offFileChooser(handler: Consumer<FileChooser>)
Link copied to clipboard
open override fun offFrameAttached(handler: Consumer<Frame>)
Link copied to clipboard
open override fun offFrameDetached(handler: Consumer<Frame>)
Link copied to clipboard
open override fun offFrameNavigated(handler: Consumer<Frame>)
Link copied to clipboard
open override fun offLoad(handler: Consumer<Page>)
Link copied to clipboard
open override fun offPageError(handler: Consumer<String>)
Link copied to clipboard
open override fun offPopup(handler: Consumer<Page>)
Link copied to clipboard
open override fun offRequest(handler: Consumer<Request>)
Link copied to clipboard
open override fun offRequestFailed(handler: Consumer<Request>)
Link copied to clipboard
open override fun offRequestFinished(handler: Consumer<Request>)
Link copied to clipboard
open override fun offResponse(handler: Consumer<Response>)
Link copied to clipboard
open override fun offWebSocket(handler: Consumer<WebSocket>)
Link copied to clipboard
open override fun offWorker(handler: Consumer<Worker>)
Link copied to clipboard
open override fun onceDialog(handler: Consumer<Dialog>)
Link copied to clipboard
open override fun onClose(handler: Consumer<Page>)
Link copied to clipboard
open override fun onConsoleMessage(handler: Consumer<ConsoleMessage>)
Link copied to clipboard
open override fun onCrash(handler: Consumer<Page>)
Link copied to clipboard
open override fun onDialog(handler: Consumer<Dialog>)
Link copied to clipboard
open override fun onDOMContentLoaded(handler: Consumer<Page>)
Link copied to clipboard
open override fun onDownload(handler: Consumer<Download>)
Link copied to clipboard
open override fun onFileChooser(handler: Consumer<FileChooser>)
Link copied to clipboard
open override fun onFrameAttached(handler: Consumer<Frame>)
Link copied to clipboard
open override fun onFrameDetached(handler: Consumer<Frame>)
Link copied to clipboard
open override fun onFrameNavigated(handler: Consumer<Frame>)
Link copied to clipboard
open override fun onLoad(handler: Consumer<Page>)
Link copied to clipboard
open override fun onPageError(handler: Consumer<String>)
Link copied to clipboard
open override fun onPopup(handler: Consumer<Page>)
Link copied to clipboard
open override fun onRequest(handler: Consumer<Request>)
Link copied to clipboard
open override fun onRequestFailed(handler: Consumer<Request>)
Link copied to clipboard
open override fun onRequestFinished(handler: Consumer<Request>)
Link copied to clipboard
open override fun onResponse(handler: Consumer<Response>)
Link copied to clipboard
open override fun onWebSocket(handler: Consumer<WebSocket>)
Link copied to clipboard
open override fun onWorker(handler: Consumer<Worker>)
Link copied to clipboard
open override fun opener(): Page
Link copied to clipboard
open override fun pause()
Link copied to clipboard
open fun pdf(): ByteArray
open override fun pdf(options: Page.PdfOptions): ByteArray
Link copied to clipboard
open fun press(selector: String, key: String)
open override fun press(selector: String, key: String, options: Page.PressOptions)
Link copied to clipboard
open fun querySelector(selector: String): ElementHandle
open override fun querySelector(selector: String, options: Page.QuerySelectorOptions): ElementHandle
Link copied to clipboard
open override fun querySelectorAll(selector: String): MutableList<ElementHandle>
Link copied to clipboard
open fun reload(): Response
open override fun reload(options: Page.ReloadOptions): Response
Link copied to clipboard
open override fun removeLocatorHandler(locator: Locator)
Link copied to clipboard
open override fun request(): APIRequestContext
Link copied to clipboard
open fun route(url: Predicate<String>, handler: Consumer<Route>)
open fun route(url: Pattern, handler: Consumer<Route>)
open fun route(url: String, handler: Consumer<Route>)
open override fun route(url: Predicate<String>, handler: Consumer<Route>, options: Page.RouteOptions)
open override fun route(url: Pattern, handler: Consumer<Route>, options: Page.RouteOptions)
open override fun route(url: String, handler: Consumer<Route>, options: Page.RouteOptions)
Link copied to clipboard
open fun routeFromHAR(har: Path)
open override fun routeFromHAR(har: Path, options: Page.RouteFromHAROptions)
Link copied to clipboard
open fun screenshot(): ByteArray
open override fun screenshot(options: Page.ScreenshotOptions): ByteArray
Link copied to clipboard
open fun selectOption(selector: String, values: ElementHandle): MutableList<String>
open fun selectOption(selector: String, values: SelectOption): MutableList<String>
open fun selectOption(selector: String, values: Array<ElementHandle>): MutableList<String>
open fun selectOption(selector: String, values: Array<SelectOption>): MutableList<String>
open fun selectOption(selector: String, values: Array<String>): MutableList<String>
open fun selectOption(selector: String, values: String): MutableList<String>
open override fun selectOption(selector: String, values: ElementHandle, options: Page.SelectOptionOptions): MutableList<String>
open override fun selectOption(selector: String, values: SelectOption, options: Page.SelectOptionOptions): MutableList<String>
open override fun selectOption(selector: String, values: Array<ElementHandle>, options: Page.SelectOptionOptions): MutableList<String>
open override fun selectOption(selector: String, values: Array<SelectOption>, options: Page.SelectOptionOptions): MutableList<String>
open override fun selectOption(selector: String, values: Array<String>, options: Page.SelectOptionOptions): MutableList<String>
open override fun selectOption(selector: String, values: String, options: Page.SelectOptionOptions): MutableList<String>
Link copied to clipboard
open fun setChecked(selector: String, checked: Boolean)
open override fun setChecked(selector: String, checked: Boolean, options: Page.SetCheckedOptions)
Link copied to clipboard
open fun setContent(html: String)
open override fun setContent(html: String, options: Page.SetContentOptions)
Link copied to clipboard
open override fun setDefaultNavigationTimeout(timeout: Double)
Link copied to clipboard
open override fun setDefaultTimeout(timeout: Double)
Link copied to clipboard
open override fun setExtraHTTPHeaders(headers: MutableMap<String, String>)
Link copied to clipboard
open fun setInputFiles(selector: String, files: FilePayload)
open fun setInputFiles(selector: String, files: Path)
open fun setInputFiles(selector: String, files: Array<FilePayload>)
open fun setInputFiles(selector: String, files: Array<Path>)
open override fun setInputFiles(selector: String, files: FilePayload, options: Page.SetInputFilesOptions)
open override fun setInputFiles(selector: String, files: Path, options: Page.SetInputFilesOptions)
open override fun setInputFiles(selector: String, files: Array<FilePayload>, options: Page.SetInputFilesOptions)
open override fun setInputFiles(selector: String, files: Array<Path>, options: Page.SetInputFilesOptions)
Link copied to clipboard
open override fun setViewportSize(width: Int, height: Int)
Link copied to clipboard
open fun tap(selector: String)
open override fun tap(selector: String, options: Page.TapOptions)
Link copied to clipboard
open fun textContent(selector: String): String
open override fun textContent(selector: String, options: Page.TextContentOptions): String
Link copied to clipboard
open override fun title(): String
Link copied to clipboard
open override fun touchscreen(): Touchscreen
Link copied to clipboard
open fun type(selector: String, text: String)
open override fun type(selector: String, text: String, options: Page.TypeOptions)
Link copied to clipboard
open fun uncheck(selector: String)
open override fun uncheck(selector: String, options: Page.UncheckOptions)
Link copied to clipboard
open fun unroute(url: Predicate<String>)
open fun unroute(url: Pattern)
open fun unroute(url: String)
open override fun unroute(url: Predicate<String>, handler: Consumer<Route>)
open override fun unroute(url: Pattern, handler: Consumer<Route>)
open override fun unroute(url: String, handler: Consumer<Route>)
Link copied to clipboard
open override fun unrouteAll()
Link copied to clipboard
open override fun url(): String
Link copied to clipboard
open override fun video(): Video
Link copied to clipboard
open override fun viewportSize(): ViewportSize
Link copied to clipboard
open fun waitForClose(callback: Runnable): Page
open override fun waitForClose(options: Page.WaitForCloseOptions, callback: Runnable): Page
Link copied to clipboard
open fun waitForCondition(condition: BooleanSupplier)
open override fun waitForCondition(condition: BooleanSupplier, options: Page.WaitForConditionOptions)
Link copied to clipboard
open fun waitForConsoleMessage(callback: Runnable): ConsoleMessage
open override fun waitForConsoleMessage(options: Page.WaitForConsoleMessageOptions, callback: Runnable): ConsoleMessage
Link copied to clipboard
open fun waitForDownload(callback: Runnable): Download
open override fun waitForDownload(options: Page.WaitForDownloadOptions, callback: Runnable): Download
Link copied to clipboard
open fun waitForFileChooser(callback: Runnable): FileChooser
open override fun waitForFileChooser(options: Page.WaitForFileChooserOptions, callback: Runnable): FileChooser
Link copied to clipboard
open fun waitForFunction(expression: String): JSHandle
open fun waitForFunction(expression: String, arg: Any): JSHandle
open override fun waitForFunction(expression: String, arg: Any, options: Page.WaitForFunctionOptions): JSHandle
Link copied to clipboard
open fun waitForLoadState()
open fun waitForLoadState(state: LoadState)
open override fun waitForLoadState(state: LoadState, options: Page.WaitForLoadStateOptions)
Link copied to clipboard
open fun waitForNavigation(callback: Runnable): Response
open override fun waitForNavigation(options: Page.WaitForNavigationOptions, callback: Runnable): Response
Link copied to clipboard
open fun waitForPopup(callback: Runnable): Page
open override fun waitForPopup(options: Page.WaitForPopupOptions, callback: Runnable): Page
Link copied to clipboard
open fun waitForRequest(urlOrPredicate: Predicate<Request>, callback: Runnable): Request
open fun waitForRequest(urlOrPredicate: Pattern, callback: Runnable): Request
open fun waitForRequest(urlOrPredicate: String, callback: Runnable): Request
open override fun waitForRequest(urlOrPredicate: Predicate<Request>, options: Page.WaitForRequestOptions, callback: Runnable): Request
open override fun waitForRequest(urlOrPredicate: Pattern, options: Page.WaitForRequestOptions, callback: Runnable): Request
open override fun waitForRequest(urlOrPredicate: String, options: Page.WaitForRequestOptions, callback: Runnable): Request
Link copied to clipboard
open fun waitForRequestFinished(callback: Runnable): Request
open override fun waitForRequestFinished(options: Page.WaitForRequestFinishedOptions, callback: Runnable): Request
Link copied to clipboard
open fun waitForResponse(urlOrPredicate: Predicate<Response>, callback: Runnable): Response
open fun waitForResponse(urlOrPredicate: Pattern, callback: Runnable): Response
open fun waitForResponse(urlOrPredicate: String, callback: Runnable): Response
open override fun waitForResponse(urlOrPredicate: Predicate<Response>, options: Page.WaitForResponseOptions, callback: Runnable): Response
open override fun waitForResponse(urlOrPredicate: Pattern, options: Page.WaitForResponseOptions, callback: Runnable): Response
open override fun waitForResponse(urlOrPredicate: String, options: Page.WaitForResponseOptions, callback: Runnable): Response
Link copied to clipboard
open fun waitForSelector(selector: String): ElementHandle
open override fun waitForSelector(selector: String, options: Page.WaitForSelectorOptions): ElementHandle
Link copied to clipboard
open override fun waitForTimeout(timeout: Double)
Link copied to clipboard
open fun waitForURL(url: Predicate<String>)
open fun waitForURL(url: Pattern)
open fun waitForURL(url: String)
open override fun waitForURL(url: Predicate<String>, options: Page.WaitForURLOptions)
open override fun waitForURL(url: Pattern, options: Page.WaitForURLOptions)
open override fun waitForURL(url: String, options: Page.WaitForURLOptions)
Link copied to clipboard
open fun waitForWebSocket(callback: Runnable): WebSocket
open override fun waitForWebSocket(options: Page.WaitForWebSocketOptions, callback: Runnable): WebSocket
Link copied to clipboard
open fun waitForWorker(callback: Runnable): Worker
open override fun waitForWorker(options: Page.WaitForWorkerOptions, callback: Runnable): Worker
Link copied to clipboard
open override fun workers(): MutableList<Worker>