-2

Is it possible to copy the text of an input? If there was an input with "text" in it can you get selenium/python to copy it in your clipboard?

<input type="text" style="cursor:text;background:none;" class="form-control input-sm" onmousemove="this.select()" value="This is a Text" readonly="">
Joshua
  • 40,822
  • 8
  • 72
  • 132
BoratTV
  • 9
  • 6
  • 1
    Can you share more details about what exactly you want to do? Also add HTML of target `input` and your current code – Andersson Feb 19 '18 at 12:55
  • Duplicate of https://stackoverflow.com/questions/25580569/get-value-of-an-input-box-using-selenium-python – Andersson Feb 19 '18 at 13:00
  • 3
    Possible duplicate of [Get value of an input box using Selenium (Python)](https://stackoverflow.com/questions/25580569/get-value-of-an-input-box-using-selenium-python) – SaschaM78 Feb 19 '18 at 13:15

1 Answers1

1

Yes, just look for the HTML element you want to get the text from and do this :

my_text = input_element.get_attribute('value')
Chuk Ultima
  • 987
  • 1
  • 11
  • 21