I'm trying to get number of notifications from element using Selenium, but it didn't see changes. Number of messages just a number above notification icon, like on picture:
But then I trying to process this element:
notify_element = WebDriverWait(driver, 20).until(EC.visibility_of_element_located((By.CLASS_NAME, 'data-count')))
count_of_notify = int(notify_element.get_attribute('data-count'))
I recive count_of_notify = 0. I don't understand why.
Code of this element:
<a id="notify-toggle" class="toggle link">
<span title="Уведомления" class="data-count" data-count="1" data-icon="">
</span>
</a>
But data-count changes depanding on number of notifications.