from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
path = "c:/users/admin/appdata/local/programs/python/python38-32/chromedriver.exe"
driver = webdriver.Chrome(path)
driver.get("https://donboscosdw.smartschool.be/login")
# Input fields
username = driver.find_element_by_name("login_form[_username]")
password = driver.find_element_by_name("login_form[_password]")
time.sleep(2)
username.clear()
password.clear()
# Login to website
username.send_keys("...")
password.send_keys("...")
username.send_keys(Keys.RETURN)
class Notifications:
ls = []
# check for new messages
messages=driver.find_element_by_xpath('//*[@id="smscTopContainer"]/nav/div[4]/button/span').get_property('data_value')
print(type(messages))
i want selenium to open my messages if i get a new one. But when i try to get the data_value . It returns None. But i want to retrieve whatever is in the data_value .
data_valueattribute. You can see it in the HTMLdata_valuethat i'm trying to get is a integer .NoValue. I've never seen that in python... Can you tell me the exact Result. is ItNone