-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.py
34 lines (26 loc) · 1020 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import time
from selenium import webdriver
from bs4 import *
import classifybuttons as cb
driver = webdriver.Chrome("C:\\chromedriver.exe")
driver.get('https://www.ing.com.au/securebanking/');
soup = BeautifulSoup(driver.page_source, "html.parser")
mydivs = soup.findAll("img", class_="style-scope ing-keypad")
mapping = []
for div in mydivs:
#print(div['src'])
mapping.append(cb.classify_image(bytes(div['src'], encoding="ascii")))
cif = driver.find_element_by_id("cifField")
cif.send_keys("00000000")
def clickPIN(l):
for num in l:
driver.execute_script("document.querySelector('.uia-pin-" + str(mapping.index(str(num))) +"').click()")
time.sleep(1)
time.sleep(2)
clickPIN([1,2,3,4])
submit = driver.find_element_by_id("login-btn")
submit.click()
time.sleep(2)
driver.execute_script("document.querySelector('a .style-scope .ing-all-accounts-summary').click()")
time.sleep(3)
driver.execute_script("document.querySelector('[data-id=ofx]').click()")