Q:

Why It is not going to work with method which is after main method?

I am automating web application. I want to run methods parallel , So have written code like :
public class test{

public static WebDriver driver;

public static void main(String args[])
{    
     driver = new FirefoxDriver();       
}

public static void Login()
{   
  driver.get("www.example.com");
  driver.findElement(By.id("uname")).sendKeys("test");
  driver.findElement(By.id("pass")).sendKeys("test");    
}
}

When I run the program , it just opens browser and then nothing. Why is it not going inside Login method?

A:

Where are you calling the Login method from the main?
public static void main(String args[])
{

 driver = new FirefoxDriver();
 Login();

}

What do you mean by I want to run the methods in parallel? 

