package com.seleniumWebdriver;
import org.openqa.selenium.By;
import org.testng.annotations.Test;
/**
* @Blog Name : Selenium Code Example
* @author Deepak Gupta
* @Created Date 4-08-2017
*
*/
public class FileUploadSendkeys extends SuperTestNG {
@Test
public void handleCalendarPopup() {
try {
driver.get("http://only-testing-blog.blogspot.in/2013/09/testing.html");
driver.findElement(By.xpath(".//*[@id='post-body-7114928646577071695']/div[1]/div[1]/form[1]/input[8]")).sendKeys("D:\\FileDownload\\Testing Text.txt");
Thread.sleep(5000);
} catch (Exception e) {
e.printStackTrace();
}
}
}
import org.openqa.selenium.By;
import org.testng.annotations.Test;
/**
* @Blog Name : Selenium Code Example
* @author Deepak Gupta
* @Created Date 4-08-2017
*
*/
public class FileUploadSendkeys extends SuperTestNG {
@Test
public void handleCalendarPopup() {
try {
driver.get("http://only-testing-blog.blogspot.in/2013/09/testing.html");
driver.findElement(By.xpath(".//*[@id='post-body-7114928646577071695']/div[1]/div[1]/form[1]/input[8]")).sendKeys("D:\\FileDownload\\Testing Text.txt");
Thread.sleep(5000);
} catch (Exception e) {
e.printStackTrace();
}
}
}
No comments:
Post a Comment