2

So i'm pretty sure that I'm doing something wrong but here it goes.

I'm trying to implement Karate UI to press a drop down menu and then select an element from that drop down.

  Scenario: go to manual entitlement
Given driver 'url'
* waitForText('body', 'Commuted value')
When waitFor('#event-dropdown').click()
And select('select[id=event-dropdown]', 'Disability')
And def checkBox = waitUntil('#chkbox_pen_label0')
Then match text(checkBox) == 'Some text'

The HTML looks as follows HTML

Would appreciate any help I can get.

Alex Arkanov
  • 49
  • 1
  • 4

1 Answers1

2

I think this should work, refer the docs: https://github.com/intuit/karate/tree/master/karate-core#select

And select('#event-dropdown', '{}Disability')
Peter Thomas
  • 54,465
  • 21
  • 84
  • 248
  • 1
    Awesome thank you so much. That worked, i tried a bunch of different things. I also wanted to say that you created an awesome tool, so coodus to you. – Alex Arkanov May 14 '20 at 21:03