Could anyone please help me with selecting a value from Kendo UI MVVM drop down using Selenium Java?
<input class="k-input fieldFullWidth" autocomplete="off" style="width: 100%;" title="" role="combobox" aria-expanded="false" tabindex="0" aria-disabled="false" aria-autocomplete="both" aria-owns="ddStore_listbox" type="text">
<input id="ddStore" class="fieldFullWidth" data-role="combobox" style="display: none;" aria-disabled="false" data-bind="value: selectedAsset.StoreID, comboboxText: selectedAsset.StoreName">
I tried to use JavascriptExecutor. But, it gives me org.openqa.selenium.WebDriverException: unknown error: Cannot set property 'value' of null error.
jse.executeScript("document.getElementById('ddstore').value = '1';");
Thanks
Use
ExplicitWait
to wait until visibility of<input>
tag element and then send your dropdown value as input`
The another alternative way is to use
JavascriptExecuter
as your tag contains attributestyle="display: none;"
so might be changes of invisibility of element