Here is what I tried :
from selenium import webdriver
driver = webdriver.Chrome(executable_path='chromedriver.exe')
driver.get("https://secure07c.chase.com/web/auth/#/logon/logon/chaseOnline?")
username = driver.find_element_by_id("userId-text-input-field")
The problem I ran into is that when I simply execute this and then manually fill the fields and click login, an error page that is made for protecting from bots pops up.
When I remove the line username = driver.find_element_by_id("userId-text-input-field")
the website works correctly and I can login manually from the automated selenium webdriver driven page.
Same problem happens when doing driver.page_source
and many other tests that request elements from the webpage.
I tried a lot of things (most options, flags, user agent, ...) but they are not relevant in this issue that's why I included the simplified version of the code that is causing the issue, basically any element selection.
The way selenium requests elements is suspicious I guess, simply finding elements raised suspicion in the chase bank website. I want to understand how selenium is finding / selecting elements and how anti-bots are detecting this very simple action. Is there a way around it ?