Keywords are used to ensure that the expected content was loaded onto a web page.

Keyword: You can specify one or more words or phrases that you wish to search for in the web page content.  If the expected keywords are not found the task will return an error.

You can enter multiple strings into the keyword fields.  The values you enter can be separated by logical expressions as follows:
{[(“keyword1″&”keyword2″)|!”keyword3”]}
]} – keyword expression end;
where
{[ – keyword expression start;
() – grouping brackets;
& – logical AND;
| – logical OR;
! – logical NOT;
“string” – a keyword;

A successful Keyword expression must include the start and end brackets as follows:

{["keyword"]}

In case you need to check a response body for keywords enclosed with double quotes it should be put inside single quotes. For example, this will check either for “state”:”Pending” or “state”:”Sent” text present in the response body.

{[ ('"state":"Pending"') | ('"state":"Sent"') ]}

To add keyword content validation to EveryStep Scripting Tool manually, use the following patterns:

tab0.KeywordAssert ("{[(\"keyword1\" & \"keyword2\") & !\"keyword3\"]}");

tab0.KeywordAssert ("{[\"keyword1\" & \"keyword2\"]}");

tab0.KeywordAssert ("{[!\"keyword1\"]}");