A
A
a_palanski2018-02-12 17:10:47
XPath
a_palanski, 2018-02-12 17:10:47

How to select specific element in xpath?

There is such a code

<div class="descr">
                <span class="charact">Бренд: </span> Зенит <br>
                <span class="charact">Цвет: </span> Белый <br>                                                                                
                <span class="charact">Материал изготовления: </span> Сталь <br>       
</div>

You need to get the value: white
request //span[2]/tex() and variations do not come out, tell me how to do it right?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dimonchik, 2018-02-12
@dimonchik2013

variations on following-sibling, of course?
give examples

K
krypt3r, 2018-02-13
@krypt3r

div/span[2]/following-sibling::node()[1]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question