Limit number of extractor characters from a column of .csv file

The field where I enter the cell data is limited to 3,000 characters. Would it be possible to limit the information extracted from column 3 of the csv file? to avoid the error for entering more characters than allowed.

{
“Command”: “type”,
“Target”: “id=description”,
“Value”: “${!COL3}”,
“Targets”: [
“id=description”,
“name=description”,
“xpath=//*[@id="description"]”,
“xpath=//textarea[@id=‘description’]”,
“xpath=//textarea”,
“css=#description”
],
“Description”: “”
}

Ui vision have not command to do this but i think with excecutivescript can do this to manipulate the variable ${!COL3} before use it in type command

thank you, solved this with executescript:

{
“Command”: “executeScript”,
“Target”: “return ${!COL3}.substr(0,2980);”,
“Value”: “o”,
“Description”: “”
},
{
“Command”: “type”,
“Target”: “id=description”,
“Value”: “${o}”,
“Targets”: [
“id=description”,
“name=description”,
“xpath=//*[@id="description"]”,
“xpath=//textarea[@id=‘description’]”,
“xpath=//textarea”,
“css=#description”
],
“Description”: “”
},

1 Like