Reading data from notepad/text file using selenium webdriver

package selenium_examples;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;

public class Test{
 public static void main(String[] args) throws IOException {
 
          
         FileReader r = new FileReader("E:\\test.txt");
         BufferedReader bfr = new BufferedReader(r);
         String x ="";
       
         while((x = bfr.readLine()) != null){
             System.out.println(x);
 
   }
         bfr.close();
 }
}
 

No comments:

Related Posts Plugin for WordPress, Blogger...

Fun and Knowledge