Is your feature request related to a problem? Please describe.
There must be two style of keywords: asserting and value returning.
This may cause a keyword number explosion like with SeleniumLibrary
Element Should Be Disabled, Element Should Be Enabled, Element Should Be Focused, Element Should Be Visible, Element Should Contain, Element Should Not Be Visible, Element Should Not Contain
And the actual value returning Get WebElement
. In this more extreme example that would require 8 keywords.
Value returning keywords are needed for automation, more complex assertions and if the value is later needed as an input to the system under test.
Using value returning assertion has currently fairly verbose syntax in Robot Framework:
${actualTitle}= Get Title
Should Be Equal ${actualTitle} Expected title
Keyword number explosion should be prevented. To make Robot Framework testing tool as good as there can be we should also aim for assertions that are easier to write in Robot Framework than in other languages.
Describe the solution you'd like
Lets built value getting keywords with assertion engine as the last arguments.
This might contain equals operator == Expected title
, unequality != Unexpected title
, reqexp matching =~ (\w+)xpected title
etc.
Syntax would be very short and in my opinion clean:
Get Title == Expected title
If done correctly, I believe this will result in a less verbose, less complex and more convinient way of doing validators.