How to get the image inside a div with Xpath

0

I'm trying to get the src of the following structure. Classy image I have no problem getting it, but I have problems with those that do not have.

<div class="image-wraper">
    <img src="imagen.jpg">
</div>

I've tried with the following.

//div[@class="image-wrapper"]//img
//div[@class="image-wrapper"]//img/@src
//div[contains(@class, "image-wrapper")]//img

with the images with class I have obtained them in the following way and it works.

//img[@class="img_class"]/@src
    
asked by Edy Lasso 05.08.2018 в 04:58
source

0 answers