I'm using selenium, scripting in python, to test a webpage that has a gwt-SuggestBox:
<div id="streamSuggestBox">
<table> <tbody><tr> <td> <div class="gwt-Label errorText">Stream:</div> </td>
<td> <div><input type="text" class="gwt-SuggestBox"></div> </td>
</tr> </tbody></table>
</div>
selenium can find the div and the input widget:
(Pdb) sugInput = self.driver.find_element_by_id("streamSuggestBox").find_element_by_tag_name("input")
(Pdb) p sugInput.tag_name
u'input'
and if there is text in the input widget, sugInput.clear()
clears it.
The problem is that sugInput.send_keys("s")
does not work -- nothing is displayed in the input field and suggestions are not brought up. How should I enter data in my gwt-SuggestBox?
You probably need to invoke a key press to get the input to start working. Here is how to do the above example from C# in python:
To invoke the suggest you could probably do this:
depending on what key press is binded to the suggest input this will probably work