Refer to this page:https://www.lanebryant.com/gold-sequin-v-neck-top/prd-358677#color/0000012216
Click on What's my size and you'll get 'get started' button. I am trying to click that but it gives timeout exception.
size = WebDriverWait(browser, 20).until(EC.element_to_be_clickable((By.XPATH,
"//button[@class='tfc-cfg-next-button tfc-auto-next-button tfc-button tfc-element tfc-click']")))
Edit I have already clicked the popup that the button is in
size = WebDriverWait(browser, 2).until(EC.element_to_be_clickable((By.XPATH,
"//a[@class='tfc-popup-click-open']")))
browser.execute_script("arguments[0].click();", size)
I have tried multiple ways to switch to popup one of which is:
main_page = browser.current_window_handle
# changing the handles to access login page
login_page = None
for handle in browser.window_handles:
if handle != main_page:
login_page = handle
browser.switch_to.window(str(login_page))
try:
browser.find_element_by_xpath("/html/body/div[2]/div/div/div/div[2]/div[2]/tfc-button-bar/div/div/tfc-next-button/span/span/button").Enabled
except:
pass
Still not working