1

I tried to achieve one scenario where after login if condition will check if that certain element exists in the webpage then match the text of the web element with some value.

How to do this using karate UI automation, I tried with the below method but it shows error in the karate report and not able to perform conditional assertion.

 * if (exists('locator')) match text('locator') == 'Website Text'

In karate report it's showing the error javax.script.ScriptException: :1:32 Expected ; but found text

Can we use match keyword like this or is there any other way karate provides to do?

ex-ninja
  • 59
  • 2

0 Answers0