×
Find plugins

AutoAction
1.1Minimum Jenkins requirement: 2.7.3ID: autoaction-step

Run the auto actions from "flat lines" scripts based on Selenium WebDriver

This plugin is used to simplify the usage of Selenium WebDriver which is main tool for Automate testing and other tasks.

For example, to complete below form:

We just need few lines as below:

Script content
Open https://accounts.google.com/SignUp?lp=1&hl=en
Input Auto First Name
Input Action Last Name
Input autoaction2019 Username
Input autoaction123 Password
Input autoaction123 Confirm
Click Next

instead of complex coding by Java, or Python ...

Prerequisites

(warning) To avoid some issues with Windows security, please start JENKINS server from WAR file (not from Window service mode)

Install browser 

AutoAction plugin will open real browser and execute the actions, so the browser is required to be installed at the machine hosting Jenkins server

Download browser driver

Download required libs

The plugin requires the libs(*.jar)  in for executing the AutoAction scripts

Download the workspace

The plugin requires the workspace folder for the cofigurations

Preparing

  • Copy above required libs to a folder
  • Copy above worksapce to a folder
  • Copy above Firefox driver (geckodriver.exe) file to folder drivers under workspace folder

Your first AutoAction running

Below steps will help you run the auto action script via Jenkins job

  • Create new project (Freestyle project is prefered)
  • Open Configuration
  • Go to Build
  • Add build step: "Run AutoAction"

  • Filling values (as below): Lib path, Root path, Browsers, Scripts, Run script only

Script content
Open https://accounts.google.com/SignUp?lp=1&hl=en
Input Auto First Name
Input Action Last Name
Input autoaction2019 Username
Input autoaction123 Password
Input autoaction123 Confirm
Click Next


  • Click Save and Click "Build Now" to run the job
  • After few seconds, a browser window would be openned and go to Google account site up page, filling the values to the form and go to the next page
  • View the statuses of steps


Sample AutoAction scripts from workspace

For complex cases (e.g. auto testing purpose), multiple test cases need to be run. Please put the content of test cases to files with extension is "chl" and copy them to anywhere in workspace folder. When running, the plugin will find them and run the script content from them.

  • Change the configuration of above Jenkin project as below (clear content of Script text area and uncheck "Run script only" checkbox)


  • Click Save and Click "Build Now" to run the job
  • Now, system will find 2 files in workspace: creategoogleaccount.chl and createmicrosoftaccount.chl and run the script content of them.


AutoAction syntax

Each line in script is an action. Currently, below list is the supported acions:

Action Params Explain Sample
Open url Open the url Open https://accounts.google.com/SignUp?lp=1&hl=en
Click guide_word(s)

Using guide_word(s) to find the an element and click it.

"Guide keywords" could be id, class, display text of HTML element which help system find the target HTML element).

Click Next

Click Next button

Verify expeted_textt_in_html_document Return status "PASSED" if the expected text is found in current html document Verify this phone number format
Wait number_of_seconds Wait in second(s). After some actions, we need to wait before run the next actions. Wait  3
Input value guide_word(s)

"Guide_words" could be id, class, display text of HTML element which help system find the target HTML element).

"value" is the value to fill in input element.

Input Action Last Name

In above line, Action is the "value", and the rest Last Name is "guide_word(s)"

Please refer to sample scripts from creategoogleaccount.chl and createmicrosoftaccount.chl

System would skip all lines which contains unsupported actions.

To make the script more readable, the complex text (e.g. url, value with spaces) can be put in dictionary files (any file with extension *.dic) with format: key = value. Please refer to sample dictionaries files under workspace folder: form.dic and url.dic

ArchivesGet past versions
Labels
This plugin has no labels