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

Many web applications will have common tasks that all operate in similar ways. For example, most web applications will have a login form and a logout button/link. This abstract parent class allows refactoring those common activities into a single location.

Parameters:

advance_to_password_field()

Sometimes hitting tab will be enough, othertimes you might need to click on it, this lets the site hook its own step for this without having to redo all of login

advance_to_username_field()

Not every web app will want to click directly on something to enter the username for login, though most will. Provide that as a default implementation, but this hook will let special sites do just this piece as needed.

confirm_login()

Give a hook for subclasses to confirm the login happened and app is ready to go.

exit(save=False)

Exit the site/tool

Parameters:

  • save: not used here, just accepted to keep a common signature for all exit calls

handle_load_dialog(path)

This should be inherited from Platform, if we got here it went up the wrong path, so let’s try to redirect up the correct side.

Parameters:

  • path: the string path to the file to upload

logout()

Logout from the site

open()

Open the desired site and be ready to do any of the other activities

prep_login()

After a prep failed we need to do an open and a login, so do that here.

submit_login()

Often hitting ENTER will be enough to submit the form, but this hook will let subclasses provide just that action without having to implement all of login