Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- import java.io.*;
- import java.text.*;
- import org.openqa.selenium.By;
- import org.openqa.selenium.WebDriver;
- import org.openqa.selenium.WebElement;
- import org.openqa.selenium.firefox.FirefoxDriver;
- import org.openqa.selenium.support.ui.ExpectedCondition;
- import org.openqa.selenium.support.ui.WebDriverWait;
- public class FinalProject{
- public static void main(String[] args) throws IOException{
- int score = 0, time_elapsed = 0;
- WebDriver driver = new FirefoxDriver();
- Scanner sc = new Scanner(System.in);
- System.out.println("Enter your username: ");
- String userName = sc.next();
- System.out.println("Enter your password: ");
- String password = sc.next();
- BufferedReader in = new BufferedReader(new FileReader(new File("UsersInfo_101.txt")));
- String strline;
- int count = 0; count++;
- while((strline = in.readLine()) != null) {
- WebElement user = driver.findElement(By.id("username"));
- WebElement pass = driver.findElement(By.id("password"));
- for(int i = 0; i <= 3; i++){
- if(userName.equalsIgnoreCase(user.toString()) && password.equals(pass.toString())){
- BufferedReader br = new BufferedReader(new FileReader(new File("TestBank.txt")));
- for(int j = 0; j < 200; ++j){
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement