Hi,
I fill a form and on submission I get a HTML web table that has 20 columns and 2877 rows. If I would have increased the date range in the form then this table would have a lot more rows. My problems is that extracting cell by cell (!replayspeed is FAST) results in a timeout after 900s.
[error] macro timeout 900s (change the value in the settings if needed)
My issue is, if it takes 15 minutes only for 70 rows then I will never be able to use this method to get 2877 rows! Can the team help me use a faster and reliable method to extract the entire table in hopefully under 5 minutes.
I am attaching the code for your reference.
{
"CreationDate": "2018-11-22",
"Commands": [
{
"Command": "store",
"Target": "fast",
"Value": "!replayspeed"
},
{
"Command": "store",
"Target": "180",
"Value": "!TIMEOUT_WAIT"
},
{
"Command": "open",
"Target": "https://www.indiabondinfo.nsdl.com/bds-web/advancedSearchRequest.do",
"Value": ""
},
{
"Command": "XClick",
"Target": "//*[@id=\"typeOfInstrument\"]",
"Value": ""
},
{
"Command": "XType",
"Target": "${KEY_CTRL+KEY_A}",
"Value": ""
},
{
"Command": "XClick",
"Target": "//*[@id=\"instrumentStatus\"]",
"Value": ""
},
{
"Command": "XType",
"Target": "${KEY_CTRL+KEY_A}",
"Value": ""
},
{
"Command": "type",
"Target": "id=allotmentDateFrom",
"Value": "15/11/2017"
},
{
"Command": "type",
"Target": "id=allotmentDateTo",
"Value": "15/11/2018"
},
{
"Command": "click",
"Target": "id=searchButtonID",
"Value": ""
},
{
"Command": "store",
"Target": "1",
"Value": "colcntr"
},
{
"Command": "store",
"Target": "1",
"Value": "rowcounter"
},
{
"Command": "label",
"Target": "STARTLOOP",
"Value": ""
},
{
"Command": "verifyElementPresent",
"Target": "//*[@id=\"rows\"]/tbody//child::tr[${rowcounter}]",
"Value": ""
},
{
"Command": "if",
"Target": "${!LastCommandOK}",
"Value": ""
},
{
"Command": "echo",
"Target": "Row present at counter ${rowcounter}",
"Value": "green"
},
{
"Command": "store",
"Target": "1",
"Value": "colcntr"
},
{
"Command": "while",
"Target": "( ${colcntr} <= 20 )",
"Value": ""
},
{
"Command": "storeText",
"Target": "//*[@id=\"rows\"]/tbody//child::tr[${rowcounter}]/td[${colcntr}]",
"Value": "!csvLine"
},
{
"Command": "storeEval",
"Target": "${colcntr} + 1",
"Value": "colcntr"
},
{
"Command": "endWhile",
"Target": "",
"Value": ""
},
{
"Command": "csvSave",
"Target": "NSDL_Bond_Debentures.csv",
"Value": ""
},
{
"Command": "storeEval",
"Target": "${rowcounter} + 1",
"Value": "rowcounter"
},
{
"Command": "gotoLabel",
"Target": "STARTLOOP",
"Value": ""
},
{
"Command": "else",
"Target": "",
"Value": ""
},
{
"Command": "echo",
"Target": "Row absent at counter ${rowcounter}",
"Value": "red"
},
{
"Command": "gotoLabel",
"Target": "ENDLOOP",
"Value": ""
},
{
"Command": "endif",
"Target": "",
"Value": ""
},
{
"Command": "label",
"Target": "ENDLOOP",
"Value": ""
},
{
"Command": "localStorageExport",
"Target": "NSDL_Bond_Debentures.csv",
"Value": "#DeleteAfterExport"
}
]
}
Thanks & Regards,
Bharat