I need help with an error when executing a code with selenium in python, where I need to extract some values hosted in a span tag, I have proceeded to save the values in some variables called "cap1, cap2 and cap3". Subsequently I must enter in another field within the web form those values that were saved in the variables mentioned above, when I send the values to that field using send_keys it shows me this data:
[<selenium.webdriver.remote.webelement.WebElement (session="c89eac54b3083cd46252ddcfaa763150", element="51cb8aa0-f83c-4e9b-8b60-eb660d6ba102")>]
could someone help me with that, it could be that the value I am extracting in the variables is not the correct one, it is worth noting that I used this code:
cap1 = driver.find_element_by_xpath("/html/body/div[5]/div[2]/div/div/form/div[9]/div/div/span[1]")
To extract the value and store it in the variable Should I use another way to extract the value and store it in the variable?
what I really want is to extract a numerical value that is displayed on the web, save it in a variable and then enter it in a field within a form on the same web.