Thank you, Plankton.
So I don’t think I am explaining the problem adequately.
Let me try again:
for each line in the csv, I have a csvsave command
once I have gathered data for each of the csv records I issue the localstorageexport command which allows me to download the file
The problem is that the csv which is downloaded has every entry from every try when I have run this macro. It even has entries from when I ran the DemoExtract macro! I tried using the delete all cookies command at the beginning of the macro and that doesn’t work.
Posting what I have so far so you can see. Hopefully I am doing a better job of explaining the problem. I have a lot more work to do to get this running as my old IMacros script and I am just learning a little about UI.Vision. I know that the below code is inefficient but just trying to get something to work for now.
Thank you again for your help.
{
“Name”: “Test2Good Working Copy”,
“CreationDate”: “2024-1-29”,
“Commands”: [
{
“Command”: “open”,
“Target”: “Home - Louisiana State Legislature”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “linkText=2024 Regular Session”,
“Value”: “”,
“Targets”: [
“linkText=2024 Regular Session”,
“xpath=//[@id="ctl00_ctl00_MainMenun9"]/td/table/tbody/tr/td/a",
“xpath=//div[2]/table/tbody/tr/td/table/tbody/tr/td/a”,
“css=#ctl00_ctl00_MainMenun9 > td > table > tbody > tr > td > a”
],
“Description”: “”
},
{
“Command”: “selectWindow”,
“Target”: “tab=1”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “id=ctl00_ctl00_PageBody_PageContent_ddlInstTypes2”,
“Value”: “”,
“Targets”: [
“id=ctl00_ctl00_PageBody_PageContent_ddlInstTypes2”,
“name=ctl00$ctl00$PageBody$PageContent$ddlInstTypes2”,
"xpath=//[@id="ctl00_ctl00_PageBody_PageContent_ddlInstTypes2"]”,
“xpath=//select[@id=‘ctl00_ctl00_PageBody_PageContent_ddlInstTypes2’]”,
“xpath=//select”,
“css=#ctl00_ctl00_PageBody_PageContent_ddlInstTypes2”
],
“Description”: “”
},
{
“Command”: “clickAndWait”,
“Target”: “id=ctl00_ctl00_PageBody_PageContent_btnSearchByInstRange”,
“Value”: “”,
“Targets”: [
“id=ctl00_ctl00_PageBody_PageContent_btnSearchByInstRange”,
“name=ctl00$ctl00$PageBody$PageContent$btnSearchByInstRange”,
“xpath=//*[@id="ctl00_ctl00_PageBody_PageContent_btnSearchByInstRange"]”,
“xpath=//input[@id=‘ctl00_ctl00_PageBody_PageContent_btnSearchByInstRange’]”,
“xpath=//td/div/input[3]”,
“css=#ctl00_ctl00_PageBody_PageContent_btnSearchByInstRange”
],
“Description”: “”
},
{
“Command”: “deleteAllCookies”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “storeText”,
“Target”: “id=ctl00_ctl00_PageBody_PageContent_ListViewSearchResults_ctrl0_HyperLink1”,
“Value”: “c2”,
“Description”: “”
},
{
“Command”: “store”,
“Target”: “${c2}”,
“Value”: “!csvLine”,
“Description”: “”
},
{
“Command”: “storeAttribute”,
“Target”: “id=ctl00_ctl00_PageBody_PageContent_ListViewSearchResults_ctrl0_HyperLink1@href”,
“Value”: “b”,
“Description”: “”
},
{
“Command”: “store”,
“Target”: “Home - Louisiana State Legislature”,
“Value”: “a”,
“Description”: “”
},
{
“Command”: “executeScript_Sandbox”,
“Target”: “return ${a} + ${b}”,
“Value”: “c2”,
“Description”: “”
},
{
“Command”: “store”,
“Target”: “${c2}”,
“Value”: “!csvLine”,
“Description”: “”
},
{
“Command”: “storeText”,
“Target”: “id=ctl00_ctl00_PageBody_PageContent_ListViewSearchResults_ctrl0_LabelStatus”,
“Value”: “c2”,
“Description”: “”
},
{
“Command”: “store”,
“Target”: “${c2}”,
“Value”: “!csvLine”,
“Description”: “”
},
{
“Command”: “storeText”,
“Target”: “id=ctl00_ctl00_PageBody_PageContent_ListViewSearchResults_ctrl0_LabelConsidered”,
“Value”: “c2”,
“Description”: “”
},
{
“Command”: “store”,
“Target”: “${c2}”,
“Value”: “!csvLine”,
“Description”: “”
},
{
“Command”: “storeText”,
“Target”: “id=ctl00_ctl00_PageBody_PageContent_ListViewSearchResults_ctrl0_LabelKWordAndSTitle”,
“Value”: “c2”,
“Description”: “”
},
{
“Command”: “store”,
“Target”: “${c2}”,
“Value”: “!csvLine”,
“Description”: “”
},
{
“Command”: “store”,
“Target”: “${c2}”,
“Value”: “!csvLine”,
“Description”: “”
},
{
“Command”: “storeText”,
“Target”: “id=ctl00_ctl00_PageBody_PageContent_ListViewSearchResults_ctrl0_LinkAuthor”,
“Value”: “c2”,
“Description”: “”
},
{
“Command”: “store”,
“Target”: “${c2}”,
“Value”: “!csvLine”,
“Description”: “”
},
{
“Command”: “echo”,
“Target”: “${!csvLine}”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “comment”,
“Target”: “Append content of !csvLine to CSV file (or create file if none exists)”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “csvSave”,
“Target”: “CurrencyConverterData”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “storeText”,
“Target”: “id=ctl00_ctl00_PageBody_PageContent_ListViewSearchResults_ctrl1_HyperLink1”,
“Value”: “c2”,
“Description”: “”
},
{
“Command”: “store”,
“Target”: “${c2}”,
“Value”: “!csvLine”,
“Description”: “”
},
{
“Command”: “storeAttribute”,
“Target”: “id=ctl00_ctl00_PageBody_PageContent_ListViewSearchResults_ctrl1_HyperLink1@href”,
“Value”: “c2”,
“Description”: “”
},
{
“Command”: “store”,
“Target”: “${c2}”,
“Value”: “!csvLine”,
“Description”: “”
},
{
“Command”: “storeText”,
“Target”: “id=ctl00_ctl00_PageBody_PageContent_ListViewSearchResults_ctrl1_LabelStatus”,
“Value”: “c2”,
“Description”: “”
},
{
“Command”: “store”,
“Target”: “${c2}”,
“Value”: “!csvLine”,
“Description”: “”
},
{
“Command”: “storeText”,
“Target”: “id=ctl00_ctl00_PageBody_PageContent_ListViewSearchResults_ctrl1_LabelConsidered”,
“Value”: “c2”,
“Description”: “”
},
{
“Command”: “store”,
“Target”: “${c2}”,
“Value”: “!csvLine”,
“Description”: “”
},
{
“Command”: “storeText”,
“Target”: “id=ctl00_ctl00_PageBody_PageContent_ListViewSearchResults_ctrl1_LabelKWordAndSTitle”,
“Value”: “c2”,
“Description”: “”
},
{
“Command”: “store”,
“Target”: “${c2}”,
“Value”: “!csvLine”,
“Description”: “”
},
{
“Command”: “store”,
“Target”: “${c2}”,
“Value”: “!csvLine”,
“Description”: “”
},
{
“Command”: “storeText”,
“Target”: “id=ctl00_ctl00_PageBody_PageContent_ListViewSearchResults_ctrl1_LinkAuthor”,
“Value”: “c2”,
“Description”: “”
},
{
“Command”: “store”,
“Target”: “${c2}”,
“Value”: “!csvLine”,
“Description”: “”
},
{
“Command”: “echo”,
“Target”: “${!csvLine}”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “comment”,
“Target”: “Append content of !csvLine to CSV file (or create file if none exists)”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “csvSave”,
“Target”: “CurrencyConverterData”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “comment”,
“Target”: “If needed, you can download (save) the CSV data from the CSV tab to the the download folder”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “localStorageExport”,
“Target”: “currencyconverterdata.csv”,
“Value”: “”,
“Description”: “”
}
]
}