How do i resolve this in selenium webdriver ?

sai sai
sai sai used Ask the Experts™
on
Code:
public static void main(String[] args) throws IOException,BiffException{

      
System.setProperty("webdriver.ie.driver","C:\\Users\\wer\\Desktop\\IEDriverServer.exe");
       WebDriver driver;
      
            driver =new InternetExplorerDriver();

                  File f1 = new File("C:\\Users\\wer\\Desktop\\Demo\\sai.xls");


      


      Workbook wbk;

      wbk = Workbook.getWorkbook(f1);

      Sheet sheet = wbk.getSheet(0);
      String username;

      username = sheet.getCell(0, 0).getContents();

      
Error:
Exception in thread "main" java.io.FileNotFoundException: C:\Users\wer\Desktop\Demo\sai.xls (The system cannot find the file specified)
      at java.io.FileInputStream.open0(Native Method)
      at java.io.FileInputStream.open(Unknown Source)
      at java.io.FileInputStream.<init>(Unknown Source)
      at jxl.Workbook.getWorkbook(Workbook.java:213)
      at jxl.Workbook.getWorkbook(Workbook.java:198)
      at test.main(test.java:98)
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
java.io.FileNotFoundException: C:\Users\wer\Desktop\Demo\sai.xls (The system cannot find the file specified)
The Exception has nothing to do with Selenium.
Are you sure you have a "Demo" folder on your Desktop and does it contain a file named "sai.xls"?
Perhaps the extension is .xlsx instead?
Question inactive

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial