Documentation
¶
Overview ¶
Package wmputils contains utility functions for wmp tests.
Package wmputils contains utility functions for wmp tests.
Package wmputils contains utility functions for wmp tests.
Package wmputils contains utility functions for wmp tests.
Index ¶
- func EnsureCaptureModeActivated(tconn *chrome.TestConn, activated bool) uiauto.Action
- func EnsureOnlyBrowserWindowOpen(ctx context.Context, tconn *chrome.TestConn, bt browser.Type) (*ash.Window, error)
- func HasScreenRecord(ctx context.Context) (bool, error)
- func IsBrowserWindow(w *ash.Window, bt browser.Type) bool
- type ResizeApp
- func (ra *ResizeApp) MoveWindowToCenter(tconn *chrome.TestConn, window *nodewith.Finder, isArcApp bool) uiauto.Action
- func (ra *ResizeApp) ResizeWindow(tconn *chrome.TestConn, window *nodewith.Finder, dragBound WindowBound) uiauto.Action
- func (ra *ResizeApp) ResizeWindowToMin(tconn *chrome.TestConn, window *nodewith.Finder) uiauto.Action
- func (ra *ResizeApp) TurnOffWindowPreset(ctx context.Context, cr *chrome.Chrome, tconn *chrome.TestConn) error
- type WindowBound
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureCaptureModeActivated ¶
EnsureCaptureModeActivated makes sure that the capture mode is activated.
func EnsureOnlyBrowserWindowOpen ¶
func EnsureOnlyBrowserWindowOpen(ctx context.Context, tconn *chrome.TestConn, bt browser.Type) (*ash.Window, error)
EnsureOnlyBrowserWindowOpen ensures that there is only one open window that is the primary browser, and waits for the browser to be visible to avoid a race that may cause test flakiness. If there is no or more than one browser window(s) open, it throws an error.
func HasScreenRecord ¶
HasScreenRecord checks if any screen record file is present in Download folder.
Types ¶
type ResizeApp ¶
ResizeApp represents an app that will be resized.
func (*ResizeApp) MoveWindowToCenter ¶
func (ra *ResizeApp) MoveWindowToCenter(tconn *chrome.TestConn, window *nodewith.Finder, isArcApp bool) uiauto.Action
MoveWindowToCenter places the window on the center of screen. Window should NOT be maximized before this function.
func (*ResizeApp) ResizeWindow ¶
func (ra *ResizeApp) ResizeWindow(tconn *chrome.TestConn, window *nodewith.Finder, dragBound WindowBound) uiauto.Action
ResizeWindow resizes window by dragging corners/sides. SetupResizableArea should be called prior to calling this function.
type WindowBound ¶
type WindowBound int
WindowBound use incremental integers to represent window boundaries.
const ( // TopLeft represents app's TopLeft corner. TopLeft WindowBound = iota // TopRight represents app's TopRight corner. TopRight // BottomLeft represents app's BottomLeft corner. BottomLeft // BottomRight represents app's BottomRight corner. BottomRight // Left represents app's Left edge. Left // Right represents app's Right edge. Right // Top represents app's Top edge. Top // Bottom represents app's Bottom edge. Bottom )