GreasyTony
New Member
I am working on creating automated selenium tests for a web application. The web page that I am testing has code which will upload a csv file to the site and once it's uploaded display a table indicating how many rows were in the csv file along with other useful info. I wrote the following selenium test for the page.\[code\]selenium.findElement(By.id("fileName)).sendKeys(file.getAbsolutePath());selenium.findElement(By.id("upload")).click();assertTrue("Checking that that the file is uploaded",selenium.findElement(By.cssSelector("td#rowCount")).equals("1"));\[/code\]When I run through the test by hand entering a filename and clicking the upload link on the page causes the page to be refreshed and updated with information about the file uploaded. When I run the test with selenium it successfully enters the file name, and then pauses indefinitely after attempting to click the upload link. When looking at the log I get the following error message "org.openqa.selenium.NoSuchElementException: Unable to locate element: {"method":"css selector","selector":"td#rowCount""I have checked all the id's used in the test and am baffled by the results I am getting because selenium appears to believe that it succeeded in clicking the upload button despite the fact that the page was never refreshed. I have checked all the id's used in the test and it does not look like Ajax is involved in uploading the file. The version of Firefox I am using is Firefox 14, and my version of selenium is 2.25.Any feedback you have on this issue is appreciated.