I have a test case that requires typing in a partial value into an ajax based textfield and verifying the list has the expected content. If it does, select the content. An
This may not work for everyone, but I simply added in a method that allowed me to type in characters with a delay.
Actions builder = new Actions(this.webDriver);
WebElement element = this.getWebElement();
for (char c : value.toCharArray()) {
builder = builder.sendKeys(element, c + "");
builder.pause(100);
}
builder.build().perform();
I then found the item that I wanted to click (
resultsElement.findElement(By.xpath("//li[.='" + valueLabel + "']"))
Where container is the resultsElement is the WebElement that contains the result set and value label is the value I want to click.
Again, it may not work for all, but it worked for me and I thought it prudent to share.