0

I'm newbie in python.Now i'm try to create automatic workflow for download all account bank-statements using selenium-python.I have 4 accounts. Like this:

enter image description here

enter image description here

This's my sample code:

from selenium import webdriver
import time
import pyautogui as py

CHROMEDRIVER_PATH = 'C:/Users/11359023/Desktop/Code_backup/00_FIN_RECONCILE_DAILY/00_Fin_Reconcile/00_CODE/chromedriver.exe'

driver = webdriver.Chrome(executable_path=CHROMEDRIVER_PATH)
driver.get("https://kcashconnectplus.kasikornbank.com/GCPCW/")
driver.maximize_window()

user_id = driver.find_element_by_id("user")
user_id.send_keys("xxxx")
password = driver.find_element_by_id("txtpassword")
password.send_keys("xxxx")
login_button = driver.find_elements_by_xpath('//*[@id="login"]')[0] #Generate Bacode Buton Click
login_button.click()

account_tab = driver.find_elements_by_xpath('//*[@id="mbar_MB75"]/span')[0] #Account
account_tab.click()

table = driver.find_element_by_xpath('//*[@id="gridTable1"]')

Please tell me can i use for loop for click all bank statements? Please forgive any mistakes.><

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.