Css first and last not working in rc selenium

I have a request:

x= sel.is_element_present("css=div#result form[class*='result']:last")

gives me a false value, but this:

    <td>storeElementPresent</td>
<td>css=div#result form[class*='result']:last</td>
<td>selFlightsFormCurrent</td>

gives me the truth.

Is there a mistake?

+3
source share
1 answer

You might want to use the XPath selector to get your first and last items. I found XPath more flexible than CSS.

0
source

Source: https://habr.com/ru/post/1792814/


All Articles