T-Plan Robot Enterprise Doc Home |
30 August 2018 |
http://www.docs.t-plan.com/robot/docs/latest/api/docs/plugin.html
http://t-plan.ltd.uk/releases/robot/plugins/filecheck.zipSet up the Java project under your favorite Java IDE. The steps for NetBeans:
filecheck/
one. Set the project name to filecheck
and click Nextrobot.jar
file from your Robot install folder. Close with OK.filecheck
/build/classes
).whereFilecheck file="<path>" timeformat="<date|time>" list="<true|false>"
The command returns the exit code of 0 (pass) if the file exists or 1 (fail) otherwise. The calling script may check the result by testing of the _EXIT_CODE variable.file is mandatory and specifies the file to be checked.
timeformat is optional and may be either "date" or "time". If the parameter is "date" or is not specified the command will save the last file modification time as regular human readable date. If the parameter is "time" it will be a number of milliseconds elapsed since the 1 of January 1970 (the native Java time). This parameter is an example of enumerated ("one of") type.
list is an optional boolean value of "true" or "false". If it is set to "true" and the argument file is a directory the command will list all files it contains. The default value is "false" (do NOT list).
"C:\Program Files (x86)\Java"
folder may create a set of variables like:com.tplan.samples.FileCheckCommand
class:
- The
getStablePopupMenuItems()
method allows to inject actions (menu items) into the command right click menu. The example demonstrates this functionality on the "Show last checked file" action.
- The command appears in the "green plus" menu of the script editor:
- Right click the command in the editor and select Properties to open the command editor:
FileCheckCommand
class for more details.getPreferences()
method are automatically exposed in the Edit->Preferences
window. To load user preference values in your command use UserConfiguration.getInstance().