0

I've been teaching myself Python and Selenium to automate a claim submission. I've managed to stumble through with lots searching and trial and error. However, I haven't been able to solve this last step. After the claim is submitted a claim number is generated:

<div class="zclip-target" id="claim-number">484508-638544</div>

I haven't been able to figure out how to retrieve this value. To no avail I tried:

claim_number=claim_number_element.getAttribute('value')

Any help or guidance would be appreciated.

P.S. there is also a button which copies that value to the clipboard. So if there is an easy way to grab the data from the clipboard that is another solution.

1 Answers1

0

If you're working with python and selenium, it's a bit incorrect api for driver instance in selenium python library:

claim_number=claim_number_element.getAttribute('value')

try that:

claim_number=claim_number_element.get_attribute('value')

or

claim_number=claim_number_element.text
Vova
  • 3,117
  • 2
  • 15
  • 23