Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Select Kendo ComboBox in Cypress

I have problem with selecting value from combobox in Cypress. It allways writes me that:

CypressError: cy.select() can only be called on a <select>. Your subject is a: <span unselectable="on" class="k-select" aria-label="select" role="button" tabindex="-1" aria-controls="fabric_listbox">...</span>
Types text into numeric inputs

My code looks like this:

describe('KendoUI', () => {

  it('types text into numeric inputs', () => {

    cy.visit('https://demos.telerik.com/kendo-ui/combobox/index');

    cy.get(':nth-child(4) > .k-dropdown-wrap > .k-select').select('Polyester')
  })
})

Can you please give me some help? You could try it on this page: https://demos.telerik.com/kendo-ui/combobox/index

Thank you.

like image 445
Dominik Skála Avatar asked Nov 18 '25 12:11

Dominik Skála


1 Answers

I resolved it.

  1. Make cy.click() on the element

  2. Found with cy.contains() text what is in the box and then click on it (cy.contains('text').click)

like image 188
Dominik Skála Avatar answered Nov 21 '25 09:11

Dominik Skála



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!