Documentation
¶
Overview ¶
Package webutil contains shared code for dealing with web content.
Index ¶
- func EvalWithShadowPiercer(ctx context.Context, c *chrome.Conn, expr string, out interface{}) error
- func NavigateToURLInApp(conn *chrome.Conn, url string, condition uiauto.Action, timeout time.Duration) uiauto.Action
- func WaitForQuiescence(ctx context.Context, conn *chrome.Conn, timeout time.Duration) error
- func WaitForQuiescenceAction(conn *chrome.Conn, timeout time.Duration) uiauto.Action
- func WaitForRender(ctx context.Context, conn *chrome.Conn, timeout time.Duration) error
- func WaitForYoutubeVideo(ctx context.Context, conn *chrome.Conn, timeout time.Duration) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EvalWithShadowPiercer ¶
EvalWithShadowPiercer loads shadowPiercingQuery and shadowPiercingQueryAll function into connection before evaluate JS code. These functions allow locating web elements piercing shadowroots. e.g. Help APP: shadowPiercingQueryAll("showoff-card") returns all cards. e.g. Setting: shadowPiercingQuery("#wallpaperButton") returns wallpaper button.
func NavigateToURLInApp ¶
func NavigateToURLInApp(conn *chrome.Conn, url string, condition uiauto.Action, timeout time.Duration) uiauto.Action
NavigateToURLInApp navigate to a particular sub page in app via changing URL in javascript. It uses a condition check to make sure the function completes correctly. It is high recommended to use UI validation in condition check.
func WaitForQuiescence ¶
WaitForQuiescence waits for the given chrome.Conn gets quiescence.
func WaitForQuiescenceAction ¶
WaitForQuiescenceAction waits for the given chrome.Conn gets quiescence.
func WaitForRender ¶
WaitForRender waits for the tab connected to the given chrome.Conn is rendered.
Types ¶
This section is empty.