How to test for blank text field when using robotframework-selenium?

Chris Curvey picture Chris Curvey · Aug 1, 2011 · Viewed 41.4k times · Source

How can I specify blank/empty value for a text field when using the robotframework-seleniumlibrary with a TSV file? For example, I have the following:

Textfield Value Should Be       identifier=name1       Chris
Textfield Value Should Be       identifier=name2

I want to test that name2 is blank. I have tried leaving it blank (which returns a message about an incorrect number of arguments. I have tried "", which looks for a pair of quotes, and '' which enters a single quote, and selenium seems to look for that

Answer

janne picture janne · Aug 6, 2011

You can use either a single backslash \ or special variable ${EMPTY} to create an empty string in the test data. User guide has the details: http://robotframework.org/robotframework/latest/RobotFrameworkUserGuide.html