Comments for Get Element Count

Topic for comments about Browser library keyword Get Element Count

Does this have a timeout, where it waits until the element count condition is met? Else what is an approach to achieve that?

Hi @breakpoint25,

The timeout is not specified in the help, so it should be the default timeout which you can adjust with Set Browser Timeout

Alternatively you can use Wait For Elements State before Get Element Count to wait for the first one to be visible before doing the count

e.g.

    ${xpath}=    Set variable     /your/xpath
    Wait For Elements State    (${xpath})[1]    visible    60 seconds
    ${count}=    Get Element Count    ${xpath}

Hope that helps,

Dave.

I got an issue when use Get Element Count in Browser Library, although element is visible, it returns 0 result, sometimes it returns correct value. It doesn’t happen if I use Selenium Library