Question: Cannot find kendo-ui drop down using capybara

Question

Cannot find kendo-ui drop down using capybara

Answers 1
Added at 2017-09-06 22:09
Tags
Question

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!

Answers to

Cannot find kendo-ui drop down using capybara

nr: #1 dodano: 2017-09-06 23:09

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.

Source Show
◀ Wstecz