Here I want to get all the class = "result-row" which are above the "h4" tag, not the ones which are below "h4" tag.
My current code selects all of them:
section = driver.find_element_by_css_selector("[class='rows']")
result_rows = section.find_elements_by_css_selector("li.result-row")
so how can i get the desired result here?