Hello,
Ik have a question.
I use the promp command to enter a number and store it as a variable.
I use this in combination with the while script to loop til the end of the csv.
My wish is that after i fill in a number one time, it does a +1 every time and use this to type the number +1 in a specified filed.
Thnx
Below the script
{
“Name”: “testblock”,
“CreationDate”: “2019-4-23”,
“Commands”: [
{
“Command”: “prompt”,
“Target”: “Type hier de extensie”,
“Value”: “extension”
},
{
“Command”: “comment”,
“Target”: “Onnet data”,
“Value”: “”
},
{
“Command”: “csvRead”,
“Target”: “onnet.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": "comment",
"Target": "Na dit blok beginnen met bouwen",
"Value": ""
},
{
"Command": "comment",
"Target": "",
"Value": "Add virtual onnet users."
},
{
"Command": "click",
"Target": "xpath=//*[@id=\"buttonbarbottom\"]/td/input[3]",
"Value": ""
},
{
"Command": "storeEval",
"Target": "{extension}+1",
“Value”: “number”
},
{
“Command”: “type”,
“Target”: “name=lastName”,
“Value”: “{!col2}"
},
{
"Command": "type",
"Target": "name=clidLastName",
"Value": "{!col2}”
},
{
“Command”: “type”,
“Target”: “name=firstName”,
“Value”: “{!col1}"
},
{
"Command": "type",
"Target": "name=clidFirstName",
"Value": "{!col1}”
},
{
“Command”: “type”,
“Target”: “name=phoneNumber”,
“Value”: “{!col3}"
},
{
"Command": "type",
"Target": "name=extension",
"Value": "{number}”
},
{
“Command”: “select”,
“Target”: “id=virtualOnNetCallTypeName”,
“Value”: “label=Default”
},
{
“Command”: “clickAndWait”,
“Target”: “xpath=//*[@id=“buttonbarbottom”]/td/input[2]”,
“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”: “onnet.csv”,
“Value”: “”
},
{
“Command”: “store”,
“Target”: “false”,
“Value”: “!errorIgnore”
},
{
“Command”: “endWhile”,
“Target”: “”,
“Value”: “”
}
]
}