i have been searching for 2 days but i couldnt come to a solution, i want a drop down to be selected. When i click on the drop down using some element.all css locator it clicks on the drop down(Drop down Opens up but error displayed). so i tried to use linkText to open up the drop down(Opens up perfectly). But after that i was not able to select the option in the drop down. (Element Not Visible displayed). also i was not able to select the option through the linkText. below r the details
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right" style="margin-right:0px">
<li>
<div uib-dropdown="" style="margin-right: 5px;" class="dropdown">
Tenant
<a href="" id="simple-dropdown" uib-dropdown-toggle="" class="dropdown-toggle" aria-haspopup="true" aria-expanded="false">
<span class="breadcrumb ng-binding" style="padding-bottom: 2px; padding-top: 2px;">cust1</span>
</a>
<ul class="uib-dropdown-menu dropdown-menu" role="menu" aria-labelledby="single-button">
<!-- ngRepeat: tenant in tenantList --><li ng-repeat="tenant in tenantList" class="ng-scope">
<a ng-click="selectTenant(0)" href="">
<span ng-show="selectedTenant.Identity == tenant.Identity" class="glyphicon glyphicon-ok"></span>
<span ng-show="selectedTenant.Identity != tenant.Identity" style="margin-left: 17px" class="ng-hide"></span>
<span class="ng-binding">cust1</span>
</a>
</li><!-- end ngRepeat: tenant in tenantList --><li ng-repeat="tenant in tenantList" class="ng-scope">
<a ng-click="selectTenant(1)" href="">
<span ng-show="selectedTenant.Identity == tenant.Identity" class="glyphicon glyphicon-ok ng-hide"></span>
<span ng-show="selectedTenant.Identity != tenant.Identity" style="margin-left: 17px" class=""></span>
<span class="ng-binding">NewTenant1</span>
</a>
</li><!-- end ngRepeat: tenant in tenantList --><li ng-repeat="tenant in tenantList" class="ng-scope">
<a ng-click="selectTenant(2)" href="">
<span ng-show="selectedTenant.Identity == tenant.Identity" class="glyphicon glyphicon-ok ng-hide"></span>
<span ng-show="selectedTenant.Identity != tenant.Identity" style="margin-left: 17px" class=""></span>
<span class="ng-binding">cust2</span>
</a>
</li><!-- end ngRepeat: tenant in tenantList -->
</ul>
</div>
I tried to do through below ways to select but i cant make it work.
- wait for the element to become visible.
- LinkText
- Options to select. (via repeater name as the option) kindly help me out
added 2 more lines. I guess we have to first switch it over to the div then we need to click on the drop down element to work. If my guess is correct can some 1 tell me how to do it.
– Dina Jan 22 '16 at 12:23