Page 1 of 1

How to get drop down total drop down options??

Posted: Fri Nov 10, 2017 8:18 pm
by saikumar
Hi, i have a scenario that "Clicking on one button displays options under it. These options count will vary based on the each content" .
For instance, I selected content A then clicked on Button(B) -> options will (x,y) display.
similarly, if I select other content B then clicked on Button(B)-> options will(x) display.

My question how to get all the options?? Where should i find options in DOM??

Re: How to get drop down total drop down options??

Posted: Fri Nov 10, 2017 8:32 pm
by mats
You'll have to put a CSS class on your ComboBox List component, and then you can use 'selectorCountIs' to verify that the ComboBox contains correct nbr of items.

https://bryntum.com/docs/siesta/#!/api/ ... torCountIs

Re: How to get drop down total drop down options??

Posted: Sat Nov 11, 2017 8:59 am
by saikumar
After clicking, comboboxcomponent i am in debugger mode now. Just, checking for options names .but i couldn't find out in DOM and i am using the below code that to throws error.

var x = t.cq1(comboboxcomponent ).getStore(),
size = x.getCount();

Where will find out the options names in DOM?? because have to verify the option names as well.

Re: How to get drop down total drop down options??

Posted: Sat Nov 11, 2017 5:45 pm
by nickolay
Sorry this question is more specific to your application than to Siesta, you'll have to figure out it yourself. Basically you can run any code in your test and it resides on the same page as your app - so you need to figure out the way for them to cooperate. This is typically achieved by giving specific CSS classes to DOM elements (for DOM queries) or specific properties to components (for Component queries).