Karate UI Drop Down Handling

孤者浪人 提交于 2021-01-05 07:17:46

问题


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.


回答1:


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

And select('#event-dropdown', '{}Disability')


来源:https://stackoverflow.com/questions/61798732/karate-ui-drop-down-handling

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!