I'm trying to use an if statement to close a popup window that appears from time to time when the browsing window comes up. I don't understand why, but I get an error.
import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import Select
driver = webdriver.Firefox('./')
driver.get("https://demo.seleniumeasy.com/")
if driver.find_element(By.CLASS_NAME ,"at4-close").is_displayed:
driver.find_element(By.CLASS_NAME ,"at4-close").click()
else:
time.sleep(4)
tree_branch = driver.find_element(By.CLASS_NAME ,"tree-branch").click()
input_forms = (driver.find_elements(By.LINK_TEXT, 'Input Forms')[1]).click()
time.sleep(5)
here is the error:
DeprecationWarning: firefox_profile has been deprecated, please pass in an Options object