Skip to content

Instantly share code, notes, and snippets.

@4M01
Last active July 10, 2016 19:21
Show Gist options
  • Save 4M01/0b593142f81f3499d846c04e79b26f50 to your computer and use it in GitHub Desktop.
Save 4M01/0b593142f81f3499d846c04e79b26f50 to your computer and use it in GitHub Desktop.
Simple Test Runner
import com.utilities.ObjectMap;
import org.openqa.selenium.firefox.FirefoxDriver;
/**
* Created by Amol Chavan on 11-07-2016.
*/
public class TestRunner {
public static void main(String[] args){
ObjectMap objectMap = new ObjectMap("Login.properties");
FirefoxDriver driver = new FirefoxDriver();
driver.get("https://wordpress.com/wp-login.php");
driver.findElement(objectMap.getLocator("Username")).sendKeys("MyUserName");
driver.findElement(objectMap.getLocator("Password")).sendKeys("MyPassword");
driver.findElement(objectMap.getLocator("StaySignedIn")).click();
driver.findElement(objectMap.getLocator("Login")).click();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment