I am having issues getting an element from the netlify dashboard. The code I have currently selected the element and shows the base element the web developers set, so obviously, they update it with javascript however how do I get this. On my dashboard it states 1 MB but my output is 0 KB each time so it seems I am only getting the base text My code:
driver = webdriver.Chrome()
driver.get("https://app.netlify.com/teams/jimbob0119/overview")
element = driver.find_element_by_name("github")
element.click()
driver.implicitly_wait(10) # seconds
login = driver.find_element_by_name("login")
login.send_keys(email)
password = driver.find_element_by_name("password")
password.send_keys(passwordstr)
loginbtn = driver.find_element_by_name("commit")
loginbtn.click()
driver.implicitly_wait(10) # seconds
getbandwidth = driver.find_element_by_xpath("//dd[@class='tw-text-xl tw-mt-4px tw-leading-none']")
print(getbandwidth.text)
The HTML:
<dd class="tw-text-xl tw-mt-4px tw-leading-none"> 1 MB
<span class="tw-text-gray-darker dark:tw-text-gray-light tw-text-base">
<span class="tw-sr-only">
out of
</span> /100 GB
</span>
<span class="tw-absolute tw-mt-2px tw-w-full">
</span>
</dd>
my output:
0 KB
out of
/100 GB