ConsoleUser
Copyright (c) 2010-2023 Skaion Corporarion, www.skaion.com
This project was developed in part by numerous sponsorships from the U.S. Government. The U.S. Government is authorized to reproduce and distribute reprints of Governmental purposes notwithstanding any copyright notation thereon.
All content reflects those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of the U.S. Government or Skaion Corporation.
- class ApplicationImpl.ApplicationImpl(system, config)¶
An abstract class that provides a common interface to all applications, and provide a place to access common functions.
Parameters:
system: a <no title> object which lets us control the remote system
config: a <no title> object defining the current user
- Print()¶
Print the current document to the default printer
- can_find_in_taskbar()¶
Return True iff this application is recognized in the taskbar
- cleanup()¶
Cleanup this application, leaving no remenants behind
- click_random_link()¶
This will find any link that is currently visisble (without scrolling, and without defined behavior for links that are only half visible), then choose one at random and click on it.
- exit(save=False)¶
This is a stub that will often exit the application. Many applications should implement their own version of this, especially any that open dialogs. Because of the specific nature of saving applications, save here will always be ignored.
Parameters:
save: ignored here, accepted to preserve the common function prototype
- is_loaded()¶
Check whether the current activity has finished loading.
Every subclass should override this method.
- is_on_top()¶
Without having necessarily opened a particular window, see if the window that is currently on top is likely one that belongs to this application.
- is_open()¶
Check whether this app still seems to be open, not necessarily with focus, but that will often help.
- is_ready()¶
Check if this application is ready to run, but unlike _prep do not try to open the app if it is not currently open and do not try to gain focus if you don’t have it.
- open()¶
Open the app
- take_top_window()¶
Assuming a window of our type is on top, claim it for ourselves.
- ApplicationImpl.prep_check(func)¶
Most action methods need to check whether they pass the prep check so this decorator will perform that check for them.