0

I'm trying to download some reports from amex site. site screenshot menu screenshot

I faced a problem that the download button is not visible/clickable for the selenium.

selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element is not clickable at point (888, 869)

This is my code:

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.action_chains import ActionChains
import time

browser = webdriver.Chrome()
browser.maximize_window()

browser.get('https://merchant-global.americanexpress.com/login?TARGET=https%3A%2F%2Fmerchants-r1.americanexpress.com'
            '%2Fen-us%2Fbusiness%2Fmerchant%2Fpayments%2Ftransactions')

browser.find_element(By.ID, 'user_id').send_keys('')
browser.find_element(By.ID, 'password').send_keys('')
browser.find_element(By.ID, 'password').send_keys(Keys.ENTER)
WebDriverWait(browser, 20).until(EC.element_to_be_clickable((By.ID, "open-download-flyout-transactions"))).click()
#WebDriverWait(browser, 4).until(EC.element_to_be_clickable((By.XPATH, '//*[@id="filter-container-download-filter-transactions"]'))).click()
WebDriverWait(browser, 4).until(EC.element_to_be_clickable((By.ID, 'searchTransactions-download-apply-button'))).click()
#element = browser.find_element(By.ID, 'searchTransactions-download-apply-button')
time.sleep(5)

Element description

1 Answer 1

0

One thing to try in this situation is to use javascript to click the element.

element_to_click = WebDriverWait(browser, 4).until(EC.presence_of_element_located((By.ID, 'searchTransactions-download-apply-button')))

browser.execute_script("arguments[0].click();", element_to_click)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.