I'm tring to get the color and the image of this code:
<a href="javascript:void(0)" class="logsss_event_cl itemAttr current " title="MULTI" data-
value="MULTI" data-logsss-const-value="{'x': 'change_color'}"><img
src="https://gloimg.rglcdn.com/rosegal/pdm-product-pic/Clothing/2020/12/24thumb-
img/1608776712993433956.jpg?im_scale=h34_1x"></a>
<a href="javascript:void(0)" class="logsss_event_cl itemAttr " title="LIGHT PINK" data-value="LIGHT
PINK" data-logsss-const-value="{'x': 'change_color'}"><img
src="https://gloimg.rglcdn.com/rosegal/pdm-product-pic/Clothing/2021/04/08thumb-
img/1617901013166741553.jpg?im_scale=h34_1x"></a>
Both of these look the same except in the class one ends in current.
My problem is I do not know how to get just the value of an element.
I've tried:
color1a= driver.find_element_by_xpath('//*[@id="select-attr-0"]/a[1]').text
color1a= driver.find_element_by_xpath("//*[@class='logsss_event_cl itemAttr
current']").get_Attribute("data-value").text
tumb1= driver.find_element_by_xpath('//*[@id="select-attr-0"]/a[2]/img').text