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
If you need to explicitly handle empty spaces as arguments of a keyword, you will need to escape them. Similarly, as when escaping empty values, it is possible to do that either by using the backslash character or by using the built-in variable ${SPACE} .
Enter Data in TextboxInput Text − This keyword works on the input type and will look for the locator name:search on the site https://www.tutorialspoint.com/ and angularjs is the value we want to type in the textbox. Click button is used to click on the button with location class:gsc-search-button-v2.
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: Robot Framework User Guide.
Yes, ${EMPTY}
is a built in variable.
There are many examples, see an example here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With