Here is the link of website from where I want to extract data,
I'm trying to get all text of href
attribute under anchor tag.
Here is the sample html:
<div id="borderForGrid" class="border">
<h5 class="">
<a href="/products/product-details/?prod=30AD">A/D TC-55 SEALER</a>
</h5>
<div id="borderForGrid" class="border">
<h5 class="">
<a href="/products/product-details/?prod=P380">Carbocrylic 3356-1</a>
</h5>
I want to extract all text values like ['A/D TC-55 SEALER','Carbocrylic 3356-1']
.
I tried with:
target = driver.find_element_by_class_name('border')
anchorElement = target.find_element_by_tag_name('a')
anchorElement.text
but it gives ''
(empty) string.
Any suggestion on how can it be achieved?
PS - Select first value of radio button under PRODUCT TYPE