Created
February 11, 2019 04:58
-
-
Save anjesh/eb222348477bc76007e047ffe01eae6f to your computer and use it in GitHub Desktop.
Kantu script for automating RC contracts publishing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"Name": "rc-auto-publishing", | |
"CreationDate": "2019-2-11", | |
"Commands": [ | |
{ | |
"Command": "csvRead", | |
"Target": "rc-contracts.csv", | |
"Value": "" | |
}, | |
{ | |
"Command": "echo", | |
"Target": "Status = ${!csvReadStatus}, line = ${!csvReadLineNumber}", | |
"Value": "" | |
}, | |
{ | |
"Command": "while", | |
"Target": "\"${!csvReadStatus}\" == \"OK\"", | |
"Value": "" | |
}, | |
{ | |
"Command": "echo", | |
"Target": "status = ${!csvReadStatus}, line = ${!csvReadLineNumber}", | |
"Value": "" | |
}, | |
{ | |
"Command": "echo", | |
"Target": "Opening contract ${!COL1}", | |
"Value": "" | |
}, | |
{ | |
"Command": "open", | |
"Target": "http://admin-staging.resourcecontracts.org/contract/${!COL1}", | |
"Value": "" | |
}, | |
{ | |
"Command": "waitForPageToLoad", | |
"Target": "", | |
"Value": "" | |
}, | |
{ | |
"Command": "store", | |
"Target": "true", | |
"Value": "!statusOK" | |
}, | |
{ | |
"Command": "verifyElementPresent", | |
"Target": "//*[@id=\"page-content-wrapper\"]/div/div/div/div/div[2]/div[1]/div[2]/div[2]/table/tbody/tr[1]/td[4]/form/button", | |
"Value": "" | |
}, | |
{ | |
"Command": "if", | |
"Target": "${!statusOK} == true", | |
"Value": "" | |
}, | |
{ | |
"Command": "clickAndWait", | |
"Target": "//*[@id=\"page-content-wrapper\"]/div/div/div/div/div[2]/div[1]/div[2]/div[2]/table/tbody/tr[1]/td[4]/form/button", | |
"Value": "" | |
}, | |
{ | |
"Command": "endif", | |
"Target": "", | |
"Value": "" | |
}, | |
{ | |
"Command": "store", | |
"Target": "true", | |
"Value": "!statusOK" | |
}, | |
{ | |
"Command": "verifyElementPresent", | |
"Target": "//*[@id=\"page-content-wrapper\"]/div/div/div/div/div[2]/div[1]/div[2]/div[2]/table/tbody/tr[1]/td[4]/form/button", | |
"Value": "" | |
}, | |
{ | |
"Command": "if", | |
"Target": "${!statusOK} == true", | |
"Value": "" | |
}, | |
{ | |
"Command": "clickAndWait", | |
"Target": "//*[@id=\"page-content-wrapper\"]/div/div/div/div/div[2]/div[1]/div[2]/div[2]/table/tbody/tr[1]/td[4]/form/button", | |
"Value": "" | |
}, | |
{ | |
"Command": "endif", | |
"Target": "", | |
"Value": "" | |
}, | |
{ | |
"Command": "storeEval", | |
"Target": "${!csvReadLineNumber}+1", | |
"Value": "!csvReadLineNumber" | |
}, | |
{ | |
"Command": "store", | |
"Target": "true", | |
"Value": "!errorIgnore" | |
}, | |
{ | |
"Command": "echo", | |
"Target": "Reading CSV line No. ${!csvReadLineNumber} ", | |
"Value": "!errorIgnore" | |
}, | |
{ | |
"Command": "csvRead", | |
"Target": "rc-contracts.csv", | |
"Value": "" | |
}, | |
{ | |
"Command": "store", | |
"Target": "false", | |
"Value": "!errorIgnore" | |
}, | |
{ | |
"Command": "endWhile", | |
"Target": "", | |
"Value": "" | |
} | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment