Got the following code:
driver.findElement(By.id("input_search")).click();
driver.findElement(By.id("input_search")).clear();
if(lower3 == true){
//read a line from a doc
document_path = "C:\\MyProject\\src\\harness\\lower_than_3"
FileInputStream fis = new FileInputStream(document_path);
BufferedReader br = new BufferedReader(new InputStreamReader(fis));
while((line = br.readLine()) != null){
//line is inserted into search field
driver.findElement(By.id("input_search")).sendKeys(line);
Thread.sleep(100);
//press search button- page should NOT refresh if string length for search is lower than three, NO search is performed
driver.findElement(By.cssSelector("div.btn-img.submit")).click();
//ASSERT OR VERIFY IF PAGE IS RELOADED OR NOT AFTER CLICK ON SEARCH BUTTON
NEED HELP
}
br.close();
}
After search click on search buton is executed (line 15 from code region) I want to check if page refresh event occurs. I DON'T WANT TO REFRESH PAGE (there are so mane examples with that :) ) I JUST WANT TO CHECK IF PAGE IS REFRESHED OR NOT