My test is entering keys in an search text box, that's mostly ajax, and then pressing enter from the keyboard. There is no button to "start" the search so we're using the Enter key.
I'm using ChromeDriver as Firefox is not supported for our application with regards to this flow.
For my webdriver code (java), I'm having it do this:
searchIcon.click(); //opens the ajax overlay of the search text box
searchBox.clear(); //clears whatever text is already there
searchBox.sendKeys(input); //enters in the input text
searchBox.sendKeys(Keys.RETURN); //press return to start the search
The problem is, I noticed that the input text is not fully typed into the text box yet and the RETURN has already taken place. Basically, I'm doing a search of part of the input text that was entered.
Anyone encountering this? I tried to add an implicitwait before the Return action but since the elements are already loaded, that isn't going to help.
<input type="text" class="inputStyle textStyle" value="" placeholder="Search" id="kw" name="_nkw" autocomplete="off" data-sid="0" onkeypress="return raptor.require('com.xx.xxxx').onKeyPress(event, 'kw');">I don't believe I can get the input data from here. - catp