/hdg

Primary LanguageJava

HDG

Automate program to log in and log out. Use Chrome to automate a web test based on given params.

WARNING: Use this system Carefully

This program is distributed AS-IS, no warranties at all.

Requirements

This program run over Linux (debian distros like Ubuntu, Xubuntu, Lubuntu or debian), and uses the following requirements:

Installation instructions

To beginning, you have to download and install prerrequisites: Java runtime 17 (openjdk), Google Chrome and Chromedriver This system has been tested on that components succesfully.

After that, you can clone this repository executing in a terminal:

git clone https://github.com/jyefi/hdg.git

And then you have to generate jar file, executing in a terminal:

mvn clean install package -Dskiptests

The last command, make a maven clean, installs the dependencies (Log4Java and Selenium), and after that generates the jar file.

Use

The program utilizes specific parameters which will be explained below.

  • user (mandatory): the username used to log in
  • pass (mandatory): the password used to log out
  • silent (optional): show/hide UI interface 'true', 'false'
  • checkBefore (optional): Verify, if the shift has been previously opened 'true', 'false'
  • checkAfter (optional): Verify, if the shift has been previously closed 'true', 'false'
  • attendType (mandatory) : ['entrada','salida']
  • lang (optional): 'es', 'cat'

The parameters has to given using parameter=value, and it doesn't matter the order. If you don't use this sintaxis, you will get a warning.

For example:

java -jar [jar file] user=johnDoe pass=MySuperSecretPassword1234 attendType=entrada

Running this jar file will initiate a test program. This program will simulate the process of logging in and logging out, and the results will be displayed in the command line.

Future releases

  • Send an email to communicate the result to the user
  • Random time before/after
  • Read program params from a file