Assert that a specific element has a class assigned. In dynamic websites like Angular elements may change their look with an assignment or removal of a css class.
assertClassInElement <id> <css-class>
assertClassNotInElement <id> <css-class>
Set a (global) variable:
#name = "John Smith"
text inputIdOne #name
Inside a subscript return a variable
return #name
Or return a constant
return "Hello John"
Receive the content of the return
#result = run getInputValue
Get a text from a inputField and insert it in a variable
#textValue = getValue inputIdOne
Assert the content of a variable variable
assertText #textValue "Hello John"
Assert that the content is not equal the variable (!)
assertTextNotExist #textValue "Hello John"
Show the content of all variables (which results in an image)
listVariables
Read content of textfile into variable (identify dynamically the encoding)
#json = readFile mySettings.json
Replace something inside a variable. In this example it replace the name John with Jack inside the "#json" variable.
#json = replace #json "John" "Jack"
Write a variable to a file (Default is UTF-8)
writeFile myNewFile.json #json
All typical CRUD operations should be accessible in a easy way
#json = readFile mySettings.json
#url = https://localhost:8080/item
POST #url #json
#listOfItems = GET https://localhost:8080/item
assertText #listOfItems "John"
#itemJohn = = GET https://localhost:8080/item/1
assertText #itemJohn "John"
#json = replace #json "John" "Jack"
PUT https://localhost:8080/item #json
DELETE https://localhost:8080/item/1
Header Informations are "prepared" in advanced for the REST Call (or just HTTP Call) with a json file.
#header = readFile myHeader.json
HEADER #header
And the header.json looks like this:
{
"Content-Type":"application/json"
...
}
Or you can set single values (it is like a map)
HEADER "Content-Type" "application/json"
or
HEADER Content-Type application/json
Naturally you need the possibility to reset the header:
HEADER RESET
#pdf = readFile myDocument.pdf
#base64Pdf = BASE64ENCODE #pdf
#pdf = BASE64DECODE #base64Pdf
Using JSch sshLogin #sshHost #sshUser #sshPassword sshCD #workingDirectory #contentOfSshDir = sshLS #contentOfFile = sshTail #exportedFile
sftpLogin
... wip (similar to SSH)