Classes
The following classes are available globally.
-
PipeableElement
represents a single element within a web page, accessible through aPipeablePage
instance. It encapsulates the functionality to interact with and manipulate web elements within the context of aWKWebView
.Instances of
PipeableElement
are typically obtained through various query methods provided byPipeablePage
, such asquerySelector
,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
See morePipeableElement
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.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 thePipeablePage
is managed correctly.Example:
See morelet webView = PipeableWebView() let page = webView.page try? await page.goto("https://example.com", waitUntil: .load) let exampleEl = try? await page.querySelector("input[name='example']")
Declaration
Swift
public class PipeablePage
-
A wrapper around
See moreWKWebView
that provides aPipeablePage
instanceDeclaration
Swift
public class PipeableWebView : WKWebView