I am playing around with Siesta and some built in assertions.
I came across a problem with the elementIsNotEmpty()
assertion.
I want to check if after typing an empty string in a login field, the field is really empty and nothing is displayed in it.
So mein Test-Chain looks something like this:
t.it("Login with non valid Data", function(t) {
t.diag("Failing the Login"),
t.chain(
// Login
t.loginFunction("", "alsoWrong"),
{
waitFor: 10000
},
t.elementIsNotEmpty(">>textfield[itemId=fldPassword]")
);
});
In My LoginFunction i work with the Same componentquery element, as you can see here:
{
action: 'type',
target: ">>textfield[itemId=fldName]",
text: user,
desc: "Type in username"
},
I get a warning at the line where i use elementIsNotEmpty
, which says:
WARN: Your component query: "textfield[itemId=fldPassword]" returned no components
Wheres the problem here?