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

浪尽此生 提交于 2019-12-03 11:28:45
janne

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

Manohar Reddy Poreddy

Yes, ${EMPTY} is a built in variable.

There are many examples, see an example here

Alonna

${EMPTY} is good for a blank value but, surprisingly, it didn't work for an empty value.

I found what I was looking for. The field I was verifying had no value in its value attribute and I wanted to verify it. It was returning '' as the value and when using ${EMPTY} it couldn't find '''' instead. Such a minor thing but ended up solving what I needed, so it depends what you're seeking to verify.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!