I have a grid with an filtering option. Whenever I sendKeys to the filtering field, it will start searching
I'm using Selenium: facebook webdriver with phpunit.
$this->webDriver->findElement(WebDriverBy::xpath('//*[@id="datatable_classrooms_wrapper"]/div[3]/div[2]/div[3]/div/table/tfoot/tr/td[1]/div/input'))->click();
$var = "Selenium";
for ($i = 0; $i<strlen($var); $i++) {$character = \substr($var, $i,1);
$this->webDriver->getKeyboard()->sendKeys($character);
}
// Here it searches for the item $character in the grid
// More actions as followed, but how do I wait here until the searches are done?
Here I will search for Selenium in the grid but how do I wait until it's done filtering? Sometimes it can take up to 12 seconds before it filters.
I guess I could just put a sleep(15);
in it but if it happens to be longer then 15 seconds it won't work.
Also implicit wait
and explicit wait
won't do the trick here , since sending the keys goes as normal as it can get.
Any suggestions towards how I can do this?
HTML:
<td class="dataTables_filter text-left" rowspan="1" colspan="1" style="width: 277px;">
<div class="input-group">
<input type="text" value="" data-position="1" data-type="text" class="form-control input-sm"></div></td>