How can I handle select tags with attribute style="display: none;"

For select tags with style=“display: none;” attribute, I cannot use selectOptionByLabel or Index


When I click the arrow mark on the right side of the Kit Family textbox, all the values in the select tag are displayed, but I can’t use selectOptionByLabel or Index to select those values, please help me give some advice.
This is my code:

1 Like

You shouldn’t because they are not visible on the screen.

Can you right click on the combo-box and select “Inspect”? Do this a second time and the HTML code for the combo-box object should display. Does it also have style, “display: none”? Or is it under the “input” tag?

Edit: If the HTML that gets displayed does not have a <select> tag, then you cannot use the various statements, selectOptionByLabel(), selectOptionByValue() nor selectOptionByIndex(). If this is the case, then we will need more HTML of what does display.

@hiendau

If you aren’t aware, you’re dealing with Kendo UI. Notice the outer span in your screenshot has the class k-dropdown-wrap. This element wraps everything that concerns the visible dropdown and includes the display:none select element, too.

The stuff you’re looking for is very likely inside the span element I highlighted in YELLOW.

Open that span and post a screenshot of what’s inside it.

Hi Grylion, I can’t see the html of the dropdown list when using Inspect.


Hi Russ, that span tag is an arrow button.

Use Firefox. Send the same screenshots again.