Check the expected value substring to match either of the strings in Protractor Jasmine -
i'm trying verify substring of value match either of strings. tried ways follows : 1) expect(row.gettext()).tocontain('håkan Åström' || 'hakan astrom')
in verification 2nd string not being checked throwing fail of step 2) expect(row.gettext()).tobein('håkan Åström','hakan astrom')
typeerror: object # has no method 'tobein' - error seen. can 1 share solution can used.
thanks
try use .tomatch(regexp). regular expression can match expected string:
expect(row.gettext()).tomatch(/h[aå]kan [aÅ]str[oö]m/)
Comments
Post a Comment