Cannot find kendo-ui drop down using capybara

I know kendo-ui hides elements from view. unselectable="on" However, I am unable to find a specific drop down or it's options using capybara.

Please see image here.

I've tried adding the :visible => false tag to a find, but that does not seem to help, either. (or it does, and I'm using the wrong selector.)

I just want to the be able to select one of the options in the drop down.

EDIT: "You don't show the actual HTML from the elements that actually become visible on the page," ~Thomas Walpole

Here it is!

Upvotes: 1

Views: 92

Answers (1)

Thomas Walpole
Thomas Walpole

Reputation: 49950

You don't show the actual HTML from the elements that actually become visible on the page, it'll be much further down the HTML and probably with an id of 'systemType_listbox(based on thearia-owns` attribute on the wrapping span. But, something like

find('select#systemType', visible: :hidden).sibling('span').click # trigger the opening of the dropdown widget
find('#systemType-list li', text: 'Bumper').click # select the Bumper option from the now visible list

will probably do want you want.

Upvotes: 0

Related Questions