I understand, but it is not a viable option. I believe the reason the macro stops is due to browser memory. I switched to the system save option, it even saves in the folder, but the macro still breaks. And it’s not even that big, just the repetition cycle is very big, like I said, about 25 to 100 thousand lines.
{
"Name": "064 - VAGAS POR POLO - V 10.0",
"CreationDate": "2024-11-7",
"Commands": [
{
"Command": "store",
"Target": "medium",
"Value": "!REPLAYSPEED",
"Description": ""
},
{
"Command": "store",
"Target": "true",
"Value": "!errorignore",
"Description": "Ignore errors and continue execution"
},
{
"Command": "store",
"Target": "180",
"Value": "!TIMEOUT_WAIT",
"Description": ""
},
{
"Command": "store",
"Target": "1",
"Value": "SOMA",
"Description": ""
},
{
"Command": "storeText",
"Target": "//*[@id='listar-ies-cadastro']/tfoot/tr/td/div/div[1]",
"Value": "TEXT_CONTEUDO",
"Description": ""
},
{
"Command": "executeScript_Sandbox",
"Target": "return ${TEXT_CONTEUDO}.match(/\\d+$/)[0];",
"Value": "TOTAL_CURSO",
"Description": ""
},
{
"Command": "label",
"Target": "checkElement_1",
"Value": "",
"Description": ""
},
{
"Command": "store",
"Target": "true",
"Value": "!errorignore",
"Description": "Ignore errors and continue execution"
},
{
"Command": "store",
"Target": "180",
"Value": "!TIMEOUT_WAIT",
"Description": ""
},
{
"Command": "store",
"Target": "medium",
"Value": "!REPLAYSPEED",
"Description": ""
},
{
"Command": "storeText",
"Target": "//*[@id=\"listar-ies-cadastro\"]/tbody[${SOMA}]/tr/td[1]",
"Value": "COD_CURSO",
"Description": ""
},
{
"Command": "executeScript_Sandbox",
"Target": "return Number(${SOMA}) + 1;",
"Value": "COD_NUM_CURSO",
"Description": ""
},
{
"Command": "verifyElementPresent",
"Target": "id=${COD_CURSO}",
"Value": "",
"Description": ""
},
{
"Command": "if_v2",
"Target": "${!LastCommandOK} == true",
"Value": "",
"Description": ""
},
{
"Command": "click",
"Target": "id=${COD_CURSO}",
"Value": "",
"Targets": [
"id=${COD_CURSO}"
],
"Description": ""
},
{
"Command": "storeText",
"Target": "//*[@id='lista-polos']/table/tfoot/tr/td/div/div[1]",
"Value": "textoCompleto",
"Description": ""
},
{
"Command": "executeScript_Sandbox",
"Target": "return ${textoCompleto}.match(/\\d+$/)[0];",
"Value": "TOTAL_POLO",
"Description": ""
},
{
"Command": "waitForElementVisible",
"Target": "//*[@id=\"paginationItemCountItemlista-polos\"]",
"Value": "",
"Description": ""
},
{
"Command": "select",
"Target": "//*[@id=\"paginationItemCountItemlista-polos\"]",
"Value": "label=1000",
"Description": ""
},
{
"Command": "executeScript",
"Target": "window.scrollTo(0, 0);",
"Value": "",
"Description": ""
},
{
"Command": "waitForElementNotPresent",
"Target": "//*[@id='paginationItemCountItemlista-polos']",
"Value": "",
"Description": ""
},
{
"Command": "store",
"Target": "0",
"Value": "CONTADOR",
"Description": ""
},
{
"Command": "while",
"Target": "true",
"Value": "",
"Description": ""
},
{
"Command": "store",
"Target": "true",
"Value": "!errorignore",
"Description": "Ignore errors and continue execution"
},
{
"Command": "store",
"Target": "5",
"Value": "!TIMEOUT_WAIT",
"Description": ""
},
{
"Command": "store",
"Target": "fast",
"Value": "!REPLAYSPEED",
"Description": ""
},
{
"Command": "storeText",
"Target": "//*[@id='divTitle']/font[2]",
"Value": "FULL_TEXT",
"Description": ""
},
{
"Command": "executeScript_Sandbox",
"Target": "return ${FULL_TEXT}.match(/\\((.*?)\\)/)[1];",
"Value": "IES",
"Description": ""
},
{
"Command": "storeText",
"Target": "//*[@id=\"dd_curso\"]/tbody/tr[2]/td",
"Value": "NOME_CURSO",
"Description": ""
},
{
"Command": "storeText",
"Target": "//*[@id=\"dd_curso\"]/tbody/tr[3]/td",
"Value": "STATUS_CURSO",
"Description": ""
},
{
"Command": "storeText",
"Target": "//*[@id=\"dd_curso\"]/tbody/tr[4]/td",
"Value": "VAGAS_AUTORIZADAS",
"Description": ""
},
{
"Command": "storeText",
"Target": "//*[@id=\"dd_curso\"]/tbody/tr[5]/td",
"Value": "VAGAS_DISTRIBUIDAS",
"Description": ""
},
{
"Command": "storeText",
"Target": "//*[@id=\"lista-polos\"]/table/tbody/tr[${SOMA}]/td[1]",
"Value": "COD_POLO",
"Description": ""
},
{
"Command": "storeText",
"Target": "//*[@id=\"lista-polos\"]/table/tbody/tr[${SOMA}]/td[2]/strong",
"Value": "NOME_POLO",
"Description": ""
},
{
"Command": "storeAttribute",
"Target": "xpath=//*[@id='dt_funcionamento_${COD_POLO}']@value",
"Value": "DATA_FUNCIONAMENTO",
"Description": ""
},
{
"Command": "storeAttribute",
"Target": "xpath=//*[@id='nu_vagas_${COD_POLO}']@value",
"Value": "NUMERO_VAGAS",
"Description": ""
},
{
"Command": "store",
"Target": "IES",
"Value": "!csvline",
"Description": ""
},
{
"Command": "store",
"Target": "${IES}",
"Value": "!csvline",
"Description": ""
},
{
"Command": "store",
"Target": "COD_CURSO",
"Value": "!csvline",
"Description": ""
},
{
"Command": "store",
"Target": "${COD_CURSO}",
"Value": "!csvline",
"Description": ""
},
{
"Command": "store",
"Target": "NOME_CURSO",
"Value": "!csvline",
"Description": ""
},
{
"Command": "store",
"Target": "${NOME_CURSO}",
"Value": "!csvline",
"Description": ""
},
{
"Command": "store",
"Target": "STATUS_CURSO",
"Value": "!csvline",
"Description": ""
},
{
"Command": "store",
"Target": "${STATUS_CURSO}",
"Value": "!csvline",
"Description": ""
},
{
"Command": "store",
"Target": "VAGAS_AUTORIZADAS",
"Value": "!csvline",
"Description": ""
},
{
"Command": "store",
"Target": "${VAGAS_AUTORIZADAS}",
"Value": "!csvline",
"Description": ""
},
{
"Command": "store",
"Target": "VAGAS_DISTRIBUIDAS",
"Value": "!csvline",
"Description": ""
},
{
"Command": "store",
"Target": "${VAGAS_DISTRIBUIDAS}",
"Value": "!csvline",
"Description": ""
},
{
"Command": "store",
"Target": "COD_POLO",
"Value": "!csvline",
"Description": ""
},
{
"Command": "store",
"Target": "${COD_POLO}",
"Value": "!csvline",
"Description": ""
},
{
"Command": "store",
"Target": "NOME_POLO",
"Value": "!csvline",
"Description": ""
},
{
"Command": "store",
"Target": "${NOME_POLO}",
"Value": "!csvline",
"Description": ""
},
{
"Command": "store",
"Target": "DATA_FUNCIONAMENTO",
"Value": "!csvline",
"Description": ""
},
{
"Command": "store",
"Target": "${DATA_FUNCIONAMENTO}",
"Value": "!csvline",
"Description": ""
},
{
"Command": "store",
"Target": "NUMERO_VAGAS",
"Value": "!csvline",
"Description": ""
},
{
"Command": "store",
"Target": "${NUMERO_VAGAS}",
"Value": "!csvline",
"Description": ""
},
{
"Command": "csvSave",
"Target": "064 - IES ${IES} - CURSO - ${NOME_CURSO}.csv",
"Value": "",
"Description": ""
},
{
"Command": "executeScript_Sandbox",
"Target": "return Number(${CONTADOR}) + 1;",
"Value": "CONTADOR",
"Description": ""
},
{
"Command": "executeScript_Sandbox",
"Target": "return parseInt('${COD_NUM_CURSO}') - 1;",
"Value": "RESULTADO_SUBTRAIDO",
"Description": ""
},
{
"Command": "echo",
"Target": "CURSO ${RESULTADO_SUBTRAIDO} DE ${TOTAL_CURSO} | POLO: ${COD_POLO} - ${CONTADOR} DE ${TOTAL_POLO} ",
"Value": "",
"Description": ""
},
{
"Command": "executeScript_Sandbox",
"Target": "return Number(${SOMA}) + 1;",
"Value": "SOMA",
"Description": ""
},
{
"Command": "verifyElementPresent",
"Target": "//*[@id='lista-polos']/table/tbody/tr[${SOMA}]/td[1]",
"Value": "",
"Description": ""
},
{
"Command": "if_v2",
"Target": "${!LastCommandOK} == false",
"Value": "",
"Description": ""
},
{
"Command": "store",
"Target": "slow",
"Value": "!REPLAYSPEED",
"Description": ""
},
{
"Command": "executeScript_Sandbox",
"Target": "return Number(${COD_NUM_CURSO});",
"Value": "SOMA",
"Description": ""
},
{
"Command": "gotoLabel",
"Target": "checkElement_1",
"Value": "",
"Description": ""
},
{
"Command": "end",
"Target": "",
"Value": "",
"Description": ""
},
{
"Command": "end",
"Target": "",
"Value": "",
"Description": ""
},
{
"Command": "end",
"Target": "",
"Value": "",
"Description": ""
},
{
"Command": "exit",
"Target": "",
"Value": "",
"Description": ""
}
]
}