I have more or less this structure, How can I select the next element after title
? The starting point must be x
or y
since the structure have duplicated classes and so on, and this one is an unique anchor. Just to clarify I need to catch the content and the reference is the title.
x = wd.find_elements_by_class_name('title')[0] // print title 0
y = wd.find_elements_by_class_name('title')[1] // print title 1
HTML:
<div class='global'>
<div class="main">
<p class="title">Title0</p>
<p class="content">Content0</p>
</div>
<div class="main">
<p class="title">Title1</p>
<p class="content">Content1</p>
</div>
</div>