0% found this document useful (0 votes)
35 views

MYDOC

bb

Uploaded by

surabhisharmamca
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

MYDOC

bb

Uploaded by

surabhisharmamca
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

package seleniumTesting;

import org.openqa.selenium.By;
import org.openqa.selenium.By.ByXPath;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;

import io.github.bonigarcia.wdm.WebDriverManager;

public class loginpage {

public static void main(String[] args) throws InterruptedException {

WebDriverManager.chromedriver().setup();
ChromeDriver driver = new ChromeDriver();
driver.get("http://automationpractice.com/index.php");

//driver.findElement(By.xpath("//*[@id=\"contact-link\"]/a")).click();
// driver.findElement(By.xpath("//*[@id=\"submitMessage\"]/span")).click();

driver.findElement(By.xpath("//*[@id=\"header\"]/div[2]/div/div/nav/div[1]/
a")).click();
driver.findElement(By.xpath("//*[@id=\"SubmitLogin\"]/span")).click();

Thread.sleep(2000);

driver.findElement(By.xpath("//*[@id=\"center_column\"]/div[1]")).click();
String msg1 =
driver.findElement(By.xpath("//*[@id=\"center_column\"]/div[1]")).getText();
// String msg = msg1.getText();
System.out.println(msg1);

//driver.get("http://automationpractice.com/index.php");

//driver.findElement(By.xpath("//*[@id=\"header\"]/div[2]/div/div/nav/
div[1]/a")).click()

//driver.findElement(By.xpath("//*[@id=\"email_create\"]")).sendKeys("surabhi25@gma
il.com");

// driver.findElement(By.xpath("//*[@id=\"SubmitCreate\"]/span")).click();

//driver.findElement(By.xpath("/html/body/div/div[2]/div/div[3]/div/
form/div[4]/button/span")).click();

// TODO Auto-generated method stub

You might also like