Documentation ¶
Overview ¶
Package phonehub is for controlling Chrome OS Phone Hub functionality.
Index ¶
- Variables
- func BatteryLevel(ctx context.Context, tconn *chrome.TestConn) (int, error)
- func DownloadMostRecentPhoto(ctx context.Context, tconn *chrome.TestConn) error
- func Enable(ctx context.Context, tconn *chrome.TestConn, cr *chrome.Chrome) error
- func FindRecentPhotosSetupButton() *nodewith.Finder
- func Hide(ctx context.Context, tconn *chrome.TestConn) error
- func LocatePhoneEnabled(ctx context.Context, tconn *chrome.TestConn) (bool, error)
- func OptInRecentPhotos(ctx context.Context, tconn *chrome.TestConn, cr *chrome.Chrome) error
- func PhoneSilenced(ctx context.Context, tconn *chrome.TestConn) (bool, error)
- func Show(ctx context.Context, tconn *chrome.TestConn) error
- func ToggleLocatePhonePod(ctx context.Context, tconn *chrome.TestConn, enable bool) error
- func ToggleRecentPhotosSetting(ctx context.Context, tconn *chrome.TestConn, cr *chrome.Chrome, enable bool) error
- func ToggleSilencePhonePod(ctx context.Context, tconn *chrome.TestConn, silence bool) error
- func WaitForLocatePhoneEnabled(ctx context.Context, tconn *chrome.TestConn, silenced bool, ...) error
- func WaitForPhoneSilenced(ctx context.Context, tconn *chrome.TestConn, silenced bool, ...) error
- type RecentTabChip
Constants ¶
This section is empty.
Variables ¶
var LocatePhonePod = phoneHubSettingPod.NameContaining("Toggle Locate phone")
LocatePhonePod is the finder for Phone Hub's "Locate phone" pod.
var PhoneHubShelfIcon = nodewith.Name("Phone Hub").Role(role.Button).ClassName("PhoneHubTray")
PhoneHubShelfIcon is the finder for the Phone Hub shelf icon.
var PhoneHubTray = nodewith.Name("Phone Hub").ClassName("Widget")
PhoneHubTray is the finder for the Phone Hub tray UI.
var RecentTabChipFinder = nodewith.Role(role.Button).HasClass("ContinueBrowsingChip")
RecentTabChipFinder is the finder for Phone Hub "Recent Chrome tab" chips.
var SilencePhonePod = phoneHubSettingPod.NameContaining("Toggle Silence phone")
SilencePhonePod is the finder for Phone Hub's Silence Phone pod.
Functions ¶
func BatteryLevel ¶
BatteryLevel returns the battery level displayed in Phone Hub.
func DownloadMostRecentPhoto ¶
DownloadMostRecentPhoto downloads the first photo shown in Phone Hub's Recent Photos section to Tote.
func Enable ¶
Enable enables Phone Hub from OS Settings using JS. Assumes a connected device has already been paired. Hide should be called afterwards to close the Phone Hub tray. It is left open here so callers can capture the UI state upon error if needed.
func FindRecentPhotosSetupButton ¶
FindRecentPhotosSetupButton returns a finder which locates the Set up button for the Recent Photos feature.
func LocatePhoneEnabled ¶
LocatePhoneEnabled returns true if the "Locate phone" pod is active, and false otherwise.
func OptInRecentPhotos ¶
OptInRecentPhotos enables the Recent Photos feature by clicking on the Set up button displayed in the Phone Hub bubble and run the set up flow right before user consent on the phone.
func PhoneSilenced ¶
PhoneSilenced returns true if the "Silence phone" pod is active, and false otherwise.
func ToggleLocatePhonePod ¶
ToggleLocatePhonePod toggles Phone Hub's "Locate phone" pod on/off.
func ToggleRecentPhotosSetting ¶
func ToggleRecentPhotosSetting(ctx context.Context, tconn *chrome.TestConn, cr *chrome.Chrome, enable bool) error
ToggleRecentPhotosSetting toggles the Recent Photos setting using JS. This assumes that a connected device has already been paired.
func ToggleSilencePhonePod ¶
ToggleSilencePhonePod toggles Phone Hub's "Silence Phone" pod on/off.
Types ¶
type RecentTabChip ¶
RecentTabChip represents one of Phone Hub's "Recent Chrome tab" chips.
func RecentTabChips ¶
RecentTabChips returns all of the "Recent Chrome tab" chips currently displayed in Phone Hub.