not now 按钮在 instagram 中没有被点击(无法定位元素)

not now button not getting clicked in instagram (Unable to locate element)

登录 Instagram 后无法点击 not now 按钮。 错误 ->

selenium.common.exceptions.NoSuchElementException:消息:没有这样的元素:无法定位元素:{"method":"xpath","selector":"//*[@class='pbNvD fPMEg ']"} (会话信息:chrome=91.0.4472.106)

def instagram_login():
        driver = webdriver.Chrome("/chromedriver")
        driver.get('https://www.instagram.com/')
        driver.maximize_window()
        driver.implicitly_wait(20)
        form = driver.find_element_by_xpath("//*[@class='HmktE']")
        usrinput = form.find_element_by_name("username")
        usrinput.clear()
        usrinput.send_keys("@gmail.com")
        usrpwd = form.find_element_by_name("password")
        usrpwd.clear()
        usrpwd.send_keys(" ")
    
        time.sleep(2)
    
        # wait = WebDriverWait(driver, 10)
        # loginbt = wait.until(cond.presence_of_element_located((By.XPATH,"//*[@class='HmktE']//button")))
        # loginbt.send_keys(Keys.ENTER)
        # loginbt.click()
        loginbt = form.find_elements_by_tag_name('button')
        print(loginbt[1])
        loginbt[1].click()
        # driver.execute_script("arguments[0].click();", loginbt)
        time.sleep(2)
    
        wait = WebDriverWait(driver, 10)
        notification= wait.until(cond.presence_of_element_located((By.XPATH, "//*[@class='pbNvD  fPMEg   ']")))
        notification = driver.find_element_by_xpath("//*[@class='pbNvD  fPMEg    ']")
        offbt=notification.find_element_by_xpath(".//*[@class='piCib']//*[@class='mt3GC']//*[@class='aOOlW   HoLwm ']")
        offbt.click()
    
        return driver
notification = driver.find_element_by_xpath("//*[contains(@class,'pbNvD')]")

notification = driver.find_element_by_xpath("//*[contains(@class,'fPMEg')]")