KendoUI dropdown - Select element - C# Help

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

KendoUI dropdown - Select element - C# Help

Sam-5
I am new in Selenium 
I am having a difficult time to select an option from my dropdown I click the drop-down and chose one of the search options and click the search button to get the results

 public static void SelectSearchOption ()
        {

            Driver.FindElement(By.CssSelector(".k-dropdown > span:nth-child(1)")).Click();
            Driver.FindElement(By.CssSelector(".k-animation-container")).Click();
            Driver.FindElement(By.LinkText("Search")).Click();
        }  
			<span style="width: 100%;" title="" class="k-widget k-dropdown k-header" unselectable="on" role="listbox" aria-haspopup="true" aria-expanded="false" tabindex="0" aria-owns="" aria-disabled="false" aria-busy="false" aria-activedescendant="f1a062f8-d13f-4121-a9da-76d199234dce">
	<span unselectable="on" class="k-dropdown-wrap k-state-default">
		<span unselectable="on" class="k-input">- All Statuses -</span>
		<span unselectable="on" class="k-select" aria-label="select">
	<span class="k-icon k-i-arrow-60-down">	</span>
	</span>
	</span>
<input data-role="dropdownlist" data-value-primitive="true" data-text-field="Status" data-value-field="StatusID" data-option-label="- All Statuses -" data-bind="value: selectedStatus, source: statuses" style="width: 100%; display: none;">
</span>

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/9a796e2a-f87d-45c5-ab24-6b72ece79f17%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: KendoUI dropdown - Select element - C# Help

Sam-5



<div style="background-color: #e6e6e6; padding: 10px 10px; margin-bottom: 10px;">
        <div class="row">
            <div class="col-md-4">
                <div class="form-group">
                    <input class="k-input form-control" id="searchColonies" placeholder="Colony Name" data-bind="value: searchParameter" type="text">
                </div>                
            </div>
            <div class="col-md-4">
                <span style="width: 100%;" title="" class="k-widget k-dropdown k-header" unselectable="on" role="listbox" aria-haspopup="true" aria-expanded="false" tabindex="0" aria-owns="" aria-disabled="false" aria-busy="false" aria-activedescendant="549cac5d-6e77-4c5b-b528-cc6321984d37"><span unselectable="on" class="k-dropdown-wrap k-state-default"><span unselectable="on" class="k-input">- All Statuses -</span><span unselectable="on" class="k-select" aria-label="select"><span class="k-icon k-i-arrow-60-down"></span></span></span><input data-role="dropdownlist" data-value-primitive="true" data-text-field="Status" data-value-field="StatusID" data-option-label="- All Statuses -" data-bind="value: selectedStatus, source: statuses" style="width: 100%; display: none;"></span>                
            </div>                      
        </div>
        <div class="row">
            <div class="col-md-4">
                <span style="width: 100%;" class="k-widget k-combobox k-header k-combobox-clearable"><span tabindex="-1" unselectable="on" class="k-dropdown-wrap k-state-default"><input class="k-input" autocomplete="off" style="" title="" role="combobox" aria-expanded="false" placeholder="- All Organizations -" tabindex="0" aria-disabled="false" aria-autocomplete="list" aria-owns="" aria-busy="false" aria-activedescendant="5e10bcaf-d176-4665-821b-8e94d8ce1be8" type="text"><span unselectable="on" class="k-icon k-clear-value k-i-close k-hidden" title="clear" role="button" tabindex="-1"></span><span unselectable="on" class="k-select" aria-label="select" role="button" tabindex="-1"><span class="k-icon k-i-arrow-60-down"></span></span></span><input data-role="combobox" data-value-primitive="true" data-text-field="Name" data-value-field="OrganizationID" data-placeholder="- All Organizations -" data-bind="value: selectedOrganization, source: organizations, events: { change: onOrganizationChange }" style="width: 100%; display: none;" aria-disabled="false"></span>
            </div>
            <div class="col-md-4">
                <span style="width: 100%;" class="k-widget k-combobox k-header k-combobox-clearable"><span tabindex="-1" unselectable="on" class="k-dropdown-wrap k-state-disabled"><input class="k-input" autocomplete="off" style="" title="" role="combobox" aria-expanded="false" placeholder="- All Projects -" tabindex="0" aria-disabled="true" aria-autocomplete="list" aria-owns="" aria-busy="false" disabled="disabled" type="text"><span unselectable="on" class="k-icon k-clear-value k-i-close k-hidden" title="clear" role="button" tabindex="-1"></span><span unselectable="on" class="k-select" aria-label="select" role="button" tabindex="-1"><span class="k-icon k-i-arrow-60-down"></span></span></span><input data-role="combobox" data-value-primitive="true" data-text-field="ProjectNumber" data-value-field="ProjectNumber" data-placeholder="- All Projects -" data-bind="value: selectedProject, source: projects, enabled: selectedOrganization" style="width: 100%; display: none;" aria-disabled="true" disabled="disabled"></span>
                
            </div>
            <div class="col-md-4">
                <div class="form-group">
                    <a class="k-button k-button-primary" data-bind="click: searchColonies">Search</a>
                    <a class="k-button" data-bind="click: resetColoniesGrid">Reset</a>
                </div>
            </div>  
        </div>
    </div>

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/28775c21-fff4-4166-beba-4a9262bf5b2a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

2018-05-31_7-57-24.jpg (15K) Download Attachment
2018-05-31_7-56-44.jpg (19K) Download Attachment