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 Office2007.Office2007(system, config)

Provide a common class from which applications in the Office 2007 Professional suite can inherit functionality.

Parameters:

  • system: a <no title> object to interact with the target system

  • config: a <no title> object defining this user

close(save=False)

Close the currently active document and switch to a random other open one if any are available. If this is the last open document it will cause Word to exit too. This will not save the document if prompted unless otherwise told to do so.

Parameters:

  • save: whether or not to save the changes if prompted

exit(save=False)

Exit the application.

Parameters:

  • save: whether or not to save the document(s) during exit if prompted

expand_office_menu()

Click through the Start Menu and submenus until the Office menu is expanded, which should leave each application’s menu item exposed, findable, and clickable.

Return: True if the menu has been expanded, False otherwise

handle_activation()

Look to see if there’s a dialog saying Office needs to be activated. If there is one, log it and hit Cancel, hoping we can continue… perhaps we can find a better answer sometime.

handle_initials()

Look for a dialog prompting the user to input their initials and handle it.

handle_welcome()

Look for a dialog indicating the Welcome to Office wizard is showing, and navigate through the wizard if it is found.

insert_file(path)

After the insert file dialog is opened, handle filling it in.

Parameters:

  • path: the path to the file to insert

load(path)

Load a file from the given path.

Parameters:

  • path: the path to the target path

save()

Save the currently active document

save_as(path)

Save the currently active document to a new path.

Parameters:

  • path: the new path