Answer the question
In order to leave comments, you need to log in
How to get to nested input field in Selenium?
I can’t get to the input in selenium for a couple of days:
<_div class="a"_>
<_div class="form-group b"_>
<_label_>"Ya tut"<_/label_>
<_input class="form-control cccc"_>
<_/div_>
<_/div_>
Answer the question
In order to leave comments, you need to log in
//div/div/input[contains(@class, 'cccc')]
But in general, you can immediately search by the input container class, or add a container class to each div, if you need to specify the entire nesting chain directly
Thank you!!! half done!
it just doesn't work that way in general. Here it is necessary that all this chain was. because next to it there is something very similar with class a1 and form-group b, and you also need to go
there too //div/div/input[contains(@class, 'cccc')]
only in the first div (and in the second classes are different. type a2 and b2, which is typical - b1 is also described with two classes "form-group b2"
therefore the question is - how to write the whole chain?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question