I need the value for attribute with the name "serial" which I am unable to get with my limited skills in python & selenium. I am looking for the output of "0000013". and please guide me how to capture the element in a loop as well. many thanks.
What I have tried:
for data in soup.find_all(class_='CoreData'):
h = data.find('h2')
k = h.find('serial')
print(k)
It returns value of "None" instead of the value of "Serial"
<h2> <!--For Verified item-->
<a class="clickable" style="cursor:pointer;" onmousedown="open_item_detail('0000013', '0', false)" id="View item Detail" serial="0000013">
Sample Item
</a>
<!--For unverified item-->
</h2>