Advertisement
Guest User

hi

a guest
Apr 3rd, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.44 KB | None | 0 0
  1. import java.util.*;
  2. import java.io.*;
  3. import java.text.*;
  4.  
  5. import org.openqa.selenium.By;
  6. import org.openqa.selenium.WebDriver;
  7. import org.openqa.selenium.WebElement;
  8. import org.openqa.selenium.firefox.FirefoxDriver;
  9. import org.openqa.selenium.support.ui.ExpectedCondition;
  10. import org.openqa.selenium.support.ui.WebDriverWait;
  11.  
  12. public class FinalProject{
  13.     public static void main(String[] args) throws IOException{
  14.         int score = 0, time_elapsed = 0;
  15.         WebDriver driver = new FirefoxDriver();
  16.         Scanner sc = new Scanner(System.in);
  17.         System.out.println("Enter your username: ");
  18.         String userName = sc.next();
  19.         System.out.println("Enter your password: ");
  20.         String password = sc.next();
  21.         BufferedReader in = new BufferedReader(new FileReader(new File("UsersInfo_101.txt")));
  22.         String strline;
  23.         int count = 0; count++;
  24.         while((strline = in.readLine()) != null) {
  25.             WebElement user = driver.findElement(By.id("username"));
  26.             WebElement pass = driver.findElement(By.id("password"));
  27.             for(int i = 0; i <= 3; i++){
  28.                 if(userName.equalsIgnoreCase(user.toString()) && password.equals(pass.toString())){
  29.                     BufferedReader br = new BufferedReader(new FileReader(new File("TestBank.txt")));
  30.                     for(int j = 0; j < 200; ++j){
  31.  
  32.                     }
  33.                 }
  34.             }
  35.         }
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement