[Python] cannot access html element using selenium in python

Discussão em 'Python' iniciado por Stack, Março 4, 2025.

  1. Stack

    Stack Membro Participativo

    I am tring to access a website, but when selenium open that website, a pop up appear and I don't know how to access the close button to close it.

    from selenium import webdriver
    from time import sleep
    from selenium.webdriver.common.keys import Keys
    import pandas as pd
    from selenium.webdriver.support.ui import Select
    from selenium.webdriver.common.by import By # in the code there are usage of By but not imported
    browser = webdriver.Chrome(executable_path="./chromedriver")
    browser.get("https://fireant.vn/dashboard/content/industries/4000")
    button=browser.find_element(By.CSS_SELECTOR, ".bp3-button")
    button.click()


    I have tried to access css selector, xpath but it didn't work (I could not close the pop up)

    Continue reading...

Compartilhe esta Página