In my web page
<button class="btn btn-small dropdown-toggle" data-toggle="dropdown">
Name Button
<span class="caret"/>
</button>
<ul class="dropdown-menu">
<input id="---" type="hidden" value="---"/>
<li>
<label class="Styledcheckbox">
<div class="Styledcheckbox">
Tranche A
</label>
</li>
.....
Manuallly when I click on the button "Name Button" a popup menu appears but When I use the method Click() of selenium the popup menu apperas then it will be closed and in this case i can't detect the text on the popup .
IWebElement element = null;
WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10));
element = wait.Until(ExpectedConditions.ElementToBeClickable(locator));
element.Click();
How can i replace this code, and the popup menu stay opened until i select a value from the popup.
I have tried also:
Actions builder = new Actions(driver);
IWebElement element = null;
WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10));
element = wait.Until(ExpectedConditions.ElementToBeClickable(locator));
builder.MoveToElement(element).Release();