Blockquote
{
“Command”: “open”,
“Target”: “Login | Xero Accounting Software”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “linkText=Due Date”,
“Value”: “”,
“Targets”: [
“linkText=Due Date”,
“xpath=//[@id="ext-gen41"]/thead/tr/td[6]/a",
“xpath=//td[6]/a”,
“css=#ext-gen41 > thead > tr > td.selected > a”
],
“Description”: “”
},
{
“Command”: “pause”,
“Target”: “1000”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “linkText=Due”,
“Value”: “”,
“Targets”: [
“linkText=Due”,
"xpath=//[@id="ext-gen41"]/thead/tr/td[9]/a”,
“xpath=//td[9]/a”,
“css=#ext-gen41 > thead > tr > td:nth-child(9) > a”
],
“Description”: “”
},
{
“Command”: “pause”,
“Target”: “1000”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “type”,
“Target”: “id=sb_txtReference”,
“Value”: “CN”,
“Targets”: [
“id=sb_txtReference”,
“name=invoiceReference”,
“xpath=//[@id="sb_txtReference"]",
“xpath=//input[@id=‘sb_txtReference’]”,
“xpath=//div/input”,
“css=#sb_txtReference”
],
“Description”: “”
},
{
“Command”: “click”,
“Target”: “linkText=Search”,
“Value”: “”,
“Targets”: [
“linkText=Search”,
“id=sbSubmit_”,
"xpath=//[@id="sbSubmit_"]”,
“xpath=//a[@id=‘sbSubmit_’]”,
“xpath=//a[2]”,
“css=#sbSubmit_”
],
“Description”: “”
},
{
“Command”: “pause”,
“Target”: “2000”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “times”,
“Target”: “10”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “store”,
“Target”: “2”,
“Value”: “i”,
“Description”: “”
},
{
“Command”: “while_v2”,
“Target”: “${i}<200”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “executeScript_Sandbox”,
“Target”: “return Number (${i}) +1;”,
“Value”: “Link”,
“Description”: “reconcile”
},
{
“Command”: “storeAttribute”,
“Target”: “xpath=//tr[${i}]/td[4]/a@href”,
“Value”: “a”,
“Description”: “”
},
{
“Command”: “echo”,
“Target”: “${a}”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “executeScript_Sandbox”,
“Target”: “return ${a}.split("=")[1].trim();”,
“Value”: “b”,
“Description”: “”
},
{
“Command”: “selectWindow”,
“Target”: “TAB=OPEN”,
“Value”: “Login | Xero Accounting Software”,
“Description”: “”
},
{
“Command”: “pause”,
“Target”: “2000”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “assertText”,
“Target”: “xpath=//[@id="ext-gen25"]/div[2]/div[5]/div[3]/div[4]/label",
“Value”: “Total Credit”,
“Description”: “”
},
{
“Command”: “if_v2”,
“Target”: “${!LastCommandOk} == true”,
“Value”: “if total credit”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “id=ext-gen32”,
“Value”: “”,
“Targets”: [
“id=ext-gen32”,
"xpath=//[@id="ext-gen32"]”,
“xpath=//div[@id=‘ext-gen32’]”,
“xpath=//dt/div”,
“css=#ext-gen32”
],
“Description”: “”
},
{
“Command”: “assertText”,
“Target”: “/html/body/div[2]/form/div/div[1]/div[2]/div[4]/div[3]/dl/dd/ul/li[1]/a”,
“Value”: “Allocate Credit”,
“Description”: “”
},
{
“Command”: “if_v2”,
“Target”: “${!LastCommandOk} == true”,
“Value”: “if apply is present”,
“Description”: “”
},
{
“Command”: “clickAndWait”,
“Target”: “//[@id="ext-gen28"]/ul/li[1]/a",
“Value”: “”,
“Description”: “”
},
{
“Command”: “times”,
“Target”: “20”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “verifyElementPresent”,
“Target”: “/html/body/div[2]/form/div/div[1]/div[2]/table/tbody/tr[${!times}]/td[5]”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “if_v2”,
“Target”: “${!LastCommandOk} == true”,
“Value”: “if present”,
“Description”: “”
},
{
“Command”: “storeText”,
“Target”: “id=AmountDue”,
“Value”: “remaining_credit”,
“Description”: “”
},
{
“Command”: “storeText”,
“Target”: “/html/body/div[2]/form/div/div[1]/div[2]/table/tbody/tr[${!times}]/td[5]”,
“Value”: “amount_due”,
“Description”: “”
},
{
“Command”: “executeScript_Sandbox”,
“Target”: “var a = ${remaining_credit}; return a.replace(‘,’, ‘’);”,
“Value”: “remaining_credit”,
“Description”: “”
},
{
“Command”: “executeScript_Sandbox”,
“Target”: “var a = ${amount_due}; return a.replace(‘,’, ‘’);”,
“Value”: “amount_due”,
“Description”: “”
},
{
“Command”: “if_v2”,
“Target”: “parseFloat (${remaining_credit}) - parseFloat (${amount_due}) >= 0”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “type”,
“Target”: “/html/body/div[2]/form/div/div[1]/div[2]/table/tbody/tr[${!times}]/td[6]/div/span/input”,
“Value”: “${amount_due}”,
“Description”: “”
},
{
“Command”: “sendKeys”,
“Target”: “/html/body/div[2]/form/div/div[1]/div[2]/table/tbody/tr[${!times}]/td[5]”,
“Value”: “${amount_due}”,
“Description”: “”
},
{
“Command”: “else”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “if_v2”,
“Target”: “parseFloat (${amount_due}) - parseFloat (${remaining_credit}) >= 0”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “type”,
“Target”: “/html/body/div[2]/form/div/div[1]/div[2]/table/tbody/tr[${!times}]/td[6]/div/span/input”,
“Value”: “${remaining_credit}”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “/html/body/div[2]/form/div/div[1]/div[2]/table/tbody/tr[${!times}]/td[5]”,
“Value”: “${amount_due}”,
“Description”: “”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “else”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “gotoLabel”,
“Target”: “complete”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “label”,
“Target”: “complete”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: "//[@id="ext-gen14"]”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “else”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “pause”,
“Target”: “1000”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “selectWindow”,
“Target”: “TAB=CLOSE”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “clickAndWait”,
“Target”: “/html/body/div[2]/form/div/div[1]/div[2]/div[6]/ul/li[6]/a”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “gotoLabel”,
“Target”: " invoices",
“Value”: “”,
“Description”: “”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”,
“Description”: “”
}
]
}
specifically the part from the while to select window, if i put the store as 1, the store attribute links to the column headers and returns that value, if I put the store as 2, it then pulls the 2nd credit note on the list. is there a reason why it would skip the first credit note?