Documentation ¶
Overview ¶
Package terminalapp supports actions on Terminal on Chrome OS.
Index ¶
- type TerminalApp
- func Find(ctx context.Context, tconn *chrome.TestConn) (*TerminalApp, error)
- func Launch(ctx context.Context, tconn *chrome.TestConn) (*TerminalApp, error)
- func LaunchSSH(ctx context.Context, tconn *chrome.TestConn, ...) (*TerminalApp, error)
- func LaunchThroughIcon(ctx context.Context, tconn *chrome.TestConn) (*TerminalApp, error)
- func (ta *TerminalApp) ClickShelfMenuItem(itemNameRegexp string) uiauto.Action
- func (ta *TerminalApp) Close() uiauto.Action
- func (ta *TerminalApp) DeleteSSHConnection(name string) uiauto.Action
- func (ta *TerminalApp) Exit(keyboard *input.KeyboardEventWriter) uiauto.Action
- func (ta *TerminalApp) ExitSSH() uiauto.Action
- func (ta *TerminalApp) RestartCrostini(keyboard *input.KeyboardEventWriter, cont *vm.Container, userName string) uiauto.Action
- func (ta *TerminalApp) RunCommand(keyboard *input.KeyboardEventWriter, cmd string) uiauto.Action
- func (ta *TerminalApp) ShutdownCrostini(cont *vm.Container) uiauto.Action
- func (ta *TerminalApp) WaitForPrompt() uiauto.Action
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TerminalApp ¶
type TerminalApp struct {
// contains filtered or unexported fields
}
TerminalApp represents an instance of the Terminal App.
func Find ¶
Find finds an open Terminal App and opens a Linux tab if not already open. An error is returned if terminal cannot be found.
func Launch ¶
Launch launches the Terminal App connected to default penguin container and returns it. An error is returned if the app fails to launch.
func LaunchSSH ¶
func LaunchSSH(ctx context.Context, tconn *chrome.TestConn, usernameAtHost, sshArgs, password string) (*TerminalApp, error)
LaunchSSH launches Terminal App and connects to usernameATHost with the optional sshArgs. An error is returned if the app fails to launch.
func LaunchThroughIcon ¶
LaunchThroughIcon launches Crostini by clicking the terminal app icon in launcher.
func (*TerminalApp) ClickShelfMenuItem ¶
func (ta *TerminalApp) ClickShelfMenuItem(itemNameRegexp string) uiauto.Action
ClickShelfMenuItem right clicks the terminal app icon on the shelf and left click the specified menu item.
func (*TerminalApp) Close ¶
func (ta *TerminalApp) Close() uiauto.Action
Close closes the Terminal App through clicking Close on shelf context menu.
func (*TerminalApp) DeleteSSHConnection ¶
func (ta *TerminalApp) DeleteSSHConnection(name string) uiauto.Action
DeleteSSHConnection deletes the specified connection link if it exists.
func (*TerminalApp) Exit ¶
func (ta *TerminalApp) Exit(keyboard *input.KeyboardEventWriter) uiauto.Action
Exit closes the Terminal App through entering exit in the Terminal window.
func (*TerminalApp) ExitSSH ¶
func (ta *TerminalApp) ExitSSH() uiauto.Action
ExitSSH exits the current connection and closes the app.
func (*TerminalApp) RestartCrostini ¶
func (ta *TerminalApp) RestartCrostini(keyboard *input.KeyboardEventWriter, cont *vm.Container, userName string) uiauto.Action
RestartCrostini shuts down Crostini and launch and exit the Terminal window.
func (*TerminalApp) RunCommand ¶
func (ta *TerminalApp) RunCommand(keyboard *input.KeyboardEventWriter, cmd string) uiauto.Action
RunCommand runs command in Terminal windows.
func (*TerminalApp) ShutdownCrostini ¶
func (ta *TerminalApp) ShutdownCrostini(cont *vm.Container) uiauto.Action
ShutdownCrostini shuts down Crostini.
func (*TerminalApp) WaitForPrompt ¶
func (ta *TerminalApp) WaitForPrompt() uiauto.Action
WaitForPrompt waits until the terminal window shows a shell prompt. Useful for either waiting for the startup process to finish or for a terminal application to exit.