http://architects-register.org.uk/list/regions
So i have this website which i want to be able to have the code click the button A, then B and C and so on. How should i do that. I tried this code which tries to get the value of the child of the element then click the buttons accordingly but it does not work. I suspect there's some other issues aside the error below.
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
driver = webdriver.Firefox()
url = 'http://architects-register.org.uk/'
driver.get(url)
find_uk = driver.find_element_by_id('ctl00_hlCountiesT').click()
elements = alphabets[0].find_element_by_tag_name('li')
def getChild(el):
return el.children[0].children[0]
for element in elements:
element = element[elements]
(getChild(element)).click()
NameError: name 'alphabets' is not defined