The following is the HTML structure:
<div class='list'>
<div>
<p class='code'>12345</p>
<p class='name'>abc</p>
</div>
<div>
<p class='code'>23456</p>
<p class='name'>bcd</p>
</div>
</div>
And there is a config.py for user input. If the user input 23456 to config.code, how can the selenium python select the second object? I am using find_by_css_selector()
to locate and select the object, but it can only select the first object, which is Code='12345'. I tried to use find_by_link_text()
, but it is a <p>
element not <a>
element. Anyone can help.....
element?
– Logan George Jun 04 '20 at 07:29