{
  "Name": "CafeF-BCTC-Excel-download-Vietstock",
  "CreationDate": "2024-5-30",
  "Commands": [
    {
      "Command": "comment",
      "Target": "store // nodisplay",
      "Value": "!replayspeed",
      "Description": ""
    },
    {
      "Command": "if",
      "Target": "${!LOOP}==2",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "open",
      "Target": "https://finance.vietstock.vn/truy-xuat-du-lieu/bao-cao-tai-chinh.htm",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "pause",
      "Target": "1000",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=/html/body/div[1]/div[2]/div[2]/div/div[2]/div[1]/div[4]/div[1]/input",
      "Value": "",
      "Description": "1 term"
    },
    {
      "Command": "select",
      "Target": "id=cbx-report-term",
      "Value": "label=năm",
      "Description": ""
    },
    {
      "Command": "select",
      "Target": "xpath=/html/body/div[1]/div[2]/div[2]/div/div[2]/div[1]/div[4]/div[2]/div/div[2]/table/tbody/tr/td[4]/select",
      "Value": "label=2023",
      "Description": ""
    },
    {
      "Command": "end",
      "Target": "",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "csvRead",
      "Target": "ticker.csv",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "type",
      "Target": "id=txt-search-code",
      "Value": "${!COL1}",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=//*[@id=\"finance-statement-left\"]/div[2]/button",
      "Value": "",
      "Description": "click Xem button"
    },
    {
      "Command": "pause",
      "Target": "2000",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "comment",
      "Target": "storeText // xpath=/html/body/div[1]/div[11]/div[2]/div/div[3]/div/div[4]/table/tbody/tr[2]/td[2]",
      "Value": "loaiBC",
      "Description": ""
    },
    {
      "Command": "comment",
      "Target": "onDownload // ${!COL1}_23CN_BCTC_${loaiBC}KT.xlsx",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "onDownload",
      "Target": "${!COL1}_23CN_BCTC_KT.xlsx",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=//*[@id=\"btn-exportExcel\"]",
      "Value": "",
      "Description": "click Excel button"
    },
    {
      "Command": "selectFrame",
      "Target": "relative=top",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "selectFrame",
      "Target": "index=0",
      "Value": "",
      "Description": ""
    },
    {
      "Command": "click",
      "Target": "xpath=/html/body/div[1]/div[2]/div[6]/div/div/div/div[2]/div/div[2]/div/input",
      "Value": "",
      "Targets": [
        "xpath=//*[@id=\"finance-statement-excel-export\"]/div/div/div/div/div",
        "xpath=//div[2]/div[6]/div/div/div/div/div",
        "css=#finance-statement-excel-export > div > div > div > div.title-header-popup > div:nth-child(1)"
      ],
      "Description": "choose Tách sheet theo bảng báo cáo"
    },
    {
      "Command": "click",
      "Target": "xpath=//*[@id=\"finance-statement-excel-export\"]/div/div/div/div[3]/button",
      "Value": "",
      "Description": "click OK"
    }
  ]
}