Classes

The following classes are available globally.

  • PipeableElement represents a single element within a web page, accessible through a PipeablePage instance. It encapsulates the functionality to interact with and manipulate web elements within the context of a WKWebView.

    Instances of PipeableElement are typically obtained through various query methods provided by PipeablePage, such as querySelector, querySelectorAll, xpathSelector, etc. These methods allow you to locate elements within the web page’s DOM based on CSS selectors or XPath expressions.

    Once obtained, a PipeableElement can be used to perform a variety of actions on the corresponding web element, including clicking, typing text, focusing, blurring, and retrieving attributes or text content. It also provides methods to wait for and query further elements within its context, enabling detailed interaction and navigation within web pages.

    See more

    Declaration

    Swift

    public class PipeableElement
  • PipeablePage provides methods to interact with a web page loaded in the webview. It can be constructed by wrapping an existing WKWebView using a constructor or by using a PipeableWebView and acquiring it from there. Note that in the case of using a constructor, you need to make sure that the lifecycle of the PipeablePage is managed correctly.

    Example:

    let webView = PipeableWebView()
    let page = webView.page
    
    try? await page.goto("https://example.com", waitUntil: .load)
    let exampleEl = try? await page.querySelector("input[name='example']")
    
    See more

    Declaration

    Swift

    public class PipeablePage
  • A wrapper around WKWebView that provides a PipeablePage instance

    See more

    Declaration

    Swift

    public class PipeableWebView : WKWebView