I want to only get text from the element and then only to get numbers from that element.
global textelement
textelement = (WebDriverWait(driver, 20).until(EC.visibility_of_element_located((By.XPATH, "//div[@class='text-nowrap text-truncate']")))).text
The text I get looks something like this
U(4) Leiknir
I want one variable to only contain text from the element and one variable to only contain numbers from that text so the output looks like this :
Text only
U Leiknir
and
Numbers only
4
Is it possible to do this?