Home > Software design >  How I get a content with selenium pytohn?
How I get a content with selenium pytohn?

Time:08-12

I need pick up the 33 number in this font, how can I get it with selenium python and store it in a variable?

<font style="vertical-align: inherit;">33</font>

CodePudding user response:

Get the font element in the usual way by xpath, then get its text with .text:

driver.find_element(By.XPATH, [xpath]).text
  • Related