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 CopperMine.CopperMine(system, config)¶
This class is the parent of all concrete implementations using the CopperMine website. It allows posting images, descriptions, tags, and comments, though ConsoleUser cannot do comments with captcha turned on.
Parameters:
system: the <no title> the user interacts with the target system on
config: the <no title> object defining this user
- advance_to_username_field()¶
This site doesn’t put text inside the field, so we can’t just click on a matched region. Instead, we can find the row and column of 2 other images and use those to locate where to click for the box.
- comment(msg)¶
Add the given message as a comment to the currently viewed entry.
Parameters:
msg: a string that ConsoleUser will type into the comment box
- confirm_login()¶
On some instances the site will scroll, unless the resolution is high enough, and so our menu links won’t be showing. So find our menu if needed.
CopperMine doesn’t have a separate App Menu for the tasks <no title> cares about, so this really is go_home for this.
- go_home()¶
Return to the Home page, regardless of where we are now.
- upload(path, desc)¶
Upload a new image with a given description, which can be empty to add no description/text to the image.
Parameters:
path: the path to the file to upload
desc: the text to add as a description of the image
- view(identifier)¶
View/read the page with the given identifier
Parameters:
identifier: the way the client will find the appropriate entry to view
- view_random()¶
Pick an entry at random and view it