webutil

package
v0.0.0-...-683b059 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2022 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Overview

Package webutil contains shared code for dealing with web content.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EvalWithShadowPiercer

func EvalWithShadowPiercer(ctx context.Context, c *chrome.Conn, expr string, out interface{}) error

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(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

func WaitForQuiescence(ctx context.Context, conn *chrome.Conn, timeout time.Duration) error

WaitForQuiescence waits for the given chrome.Conn gets quiescence.

func WaitForQuiescenceAction

func WaitForQuiescenceAction(conn *chrome.Conn, timeout time.Duration) uiauto.Action

WaitForQuiescenceAction waits for the given chrome.Conn gets quiescence.

func WaitForRender

func WaitForRender(ctx context.Context, conn *chrome.Conn, timeout time.Duration) error

WaitForRender waits for the tab connected to the given chrome.Conn is rendered.

func WaitForYoutubeVideo

func WaitForYoutubeVideo(ctx context.Context, conn *chrome.Conn, timeout time.Duration) error

WaitForYoutubeVideo waits for a YouTube video to start on the given chrome.Conn.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL