Does this work for anyone? Element Text Should Be

Hi everyone. Here’s a basic test that I would expect to pass, but doesn’t. Element text is always returned as empty. Not sure if I’m doing something wrong here or if it’s bugged in the latest version of SeleniumLibrary.

    open browser      
    wait until page contains element  name:q
    input text                        name:q  aaa
    element text should be            name:q  aaa

You should try to omit the name locator because it is one of the defaults. For example:
wait until page contains element q

See the SeleniumLibrary documentation, about locators.

It’s the same result, the problem is not with the locator but with getting the element’s text. It’s always empty. I can see that ‘aaa’ is written into it on screen.

The text of element 'q' should have been 'aaa' but it was ''.

You are not looking for the Text of the element but the Value
Input elements have Values

${value}=    Get Value    name:q
Should Be Equal As String   ${value}   aaa

Right, I’m dumb :smile: