| || |
- 1 Post By dlai
How to get elements in html tag using selenium python
How to get the elements 1-25 and 104 seperately under the b tag ? For URL please find the below link
https://jobs.ericsson.com/search/?q=Python ( I am looking for the results getting displayed at the bottom)
<div class="paginationShell clearfix" lang="en_US" xml:lang="en_US">
<div class="pagination well well-small">
<b>1 – 25</b>
The better way is ask your developer to decorate that element with and ID or data-* attribute to make locating the element easier and more consistent.
Originally Posted by Buddy5
A hackish way you can use is using negative indexes. For example, driver.find_elements_by_tag_name("b")[-2] will get your the 2nd to the last element in the list.