1

In my Application UI, there are multiple dropdown available. I want to validate if dropdown contains only specific values not more than that. Is there any specific way we can do this in Karate. As for select the value from drop down and set the value for drop down we can use select() and value(set) .

Please suggest.

Saurabh Garg
  • 135
  • 6

1 Answers1

0

Hard to say without knowing the HTML.

But I suggest using scriptAll() to return data which you can assert on.

See the docs: https://github.com/intuit/karate/tree/master/karate-core#scriptall

Also see:

https://stackoverflow.com/a/66640025/143475

https://stackoverflow.com/a/65590055/143475

https://stackoverflow.com/a/66707088/143475

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248