1

I have a folloving HTML code:

<option value="789444" sample="" sample_custom_attribute="SCA" selected="">Sand Box</option>

Is there a whey to get custom attribute value from this one with selenium. I wanna get value from sample_custom_attribute ("SCA").

  • Possible duplicate of [How to get attribute of element from Selenium?](https://stackoverflow.com/questions/30324760/how-to-get-attribute-of-element-from-selenium) – JaSON Dec 04 '18 at 21:49

1 Answers1

0

Once you locate the element it it is a matter of using

element.get_attribute('sample_custom_attribute')
caverac
  • 1,505
  • 2
  • 12
  • 17