1

When i run my script on Python using Selenium it appears that Firefox understands that a bot is taking over. Is there any way i can bypass that?

 firefox_capabilities = DesiredCapabilities.FIREFOX
    firefox_capabilities['marionette'] = True
    
    driver = webdriver.Firefox(capabilities=firefox_capabilities)
        
    
    driver.get('https://ibank.nbg.gr/identity/login?ReturnUrl=https:%2F%2Fibank.nbg.gr%2Fidentity%2Fconnect%2Fauthorize%2Fcallback%3Fclient_id%3D48423927-4F90-46A4-9F41-63A0B3114A92%26redirect_uri%3Dhttps%253A%252F%252Fibank.nbg.gr%252Fweb%252F%26response_mode%3Dform_post%26response_type%3Dcode%2520id_token%26scope%3Dopenid%2520role%2520ibank_profile%2520ibank-cards-api-v1%2520ibank-loans-api-v1%2520ibank-profile-api-v1%2520ibank-go4more-api-v1%2520ibank-billpayments-api-v1%2520ibank-accounts-api-v1%2520ibank-proxy-api-v1%26state%3DOpenIdConnect.AuthenticationProperties%253D3tP2ICLlQXSz7NC-pgLykBLQSVszlMygBdTcCup0TA-ySLABDDNKm9wC_IuN4PJe0gSdNCVrXDI1TskntUbdHl170X2d1AtIYYll4psfjgogqdnii7uGFeYY9DhAU5419o5lU_bmfm1L3QwzgJd78MtMooMTgF1Ancj6k8btGg7hGiYiKJF09rxhIE_BAni6rAkNA_tyvvHJhoz0l6C5Nw%26nonce%3D637350760833021182.MTQxMmQyYmItZDc2Zi00NmZiLTlmM2MtY2Q2YTAxY2RiN2RiN2Y5NDQyZjItYjZkOS00ODlhLTg1ODItNDk0YTNmZGNiNjFm%26x-client-SKU%3DID_NET451%26x-client-ver%3D5.2.1.0')
    driver.find_element_by_xpath('/html/body/index-page/div/login/div/div[1]/sign-in/sign-in-form/div/div/div/div[1]/div/input').send_keys(12345678)
    time.sleep(2)
    driver.find_element_by_xpath('/html/body/index-page/div/login/div/div[1]/sign-in/sign-in-form/div/div/div/div[2]/spinner/button').click()

With this code a bot takes over. I would like Mozilla to think that a person is behind the actions

  • Does this answer your question? [Is there anyway to automate actions with this page with headless selenium firefox?](https://stackoverflow.com/questions/63779814/is-there-anyway-to-automate-actions-with-this-page-with-headless-selenium-firefo) – Dev Sep 07 '20 at 17:35
  • Can you share why you feel firefox thinks a bot is taking over? - normally headless is by choice, you need to specify additional code to initiate headless testing. Your title says to run without headless so can you please share your code where you initiate your firefox driver? – RichEdwards Sep 07 '20 at 17:47
  • i added the imporant piece of the code that makes Firefox show the bot – Giannis Papadopoulos Sep 07 '20 at 18:19
  • did you test it with Chrome ? Usually bot detection has nothing to do with browser you use but server has system to recognize Selenium. As I know Selenium uses JavaScript code to control web browser and servers can recognize this code. There are questions on Stackoverflow which explain how to modify Selenium code and change variables in its JavaScript code to resolve problem with bot detecting. – furas Sep 07 '20 at 18:24

0 Answers0