Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main(String[] args) throws InterruptedException {
- // TODO Auto-generated method stub
- /*System.setProperty("webdriver.ie.driver","D:\Backup\Documents\Automation\drivers\IEDriverServer.exe");
- InternetExplorerDriver driver = new InternetExplorerDriver();
- driver.get("https://www.google.com");
- WebDriverWait driverWait = new WebDriverWait(driver,50);
- driverWait.until(ExpectedConditions.elementToBeClickable(By.xpath("//*[@id='lst-ib']"))).click();
- driver.findElementByXPath("//*[@id='lst-ib']").sendKeys("Make My Trip");
- driver.findElementById("_fZl").click();
- driverWait.until(ExpectedConditions.elementToBeClickable(By.linkText("MakeMyTrip, India's No 1 Travel Site | Book Hotels, Flights, Holiday ..."))).click();
- Screenshot S1 = new Screenshot();
- S1.Takescreen();*/
- String username = null;
- String password = null;
- MyClass C1 = new MyClass();
- C1.URLs(username, password);
- }
- public void URLs (String username, String password) throws InterruptedException
- {
- System.setProperty("webdriver.ie.driver","D:\Backup\Documents\Automation\drivers\IEDriverServer.exe");
- InternetExplorerDriver driver = new InternetExplorerDriver();
- driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
- driver.get("https://google.com");
- driver.findElement(By.className("lst lst-tbb sbibps")).sendKeys("irctc");
- driver.findElement(By.id("_fZl")).click();
- Thread.sleep(10000);
- driver.findElement(By.linkText("IRCTC Next Generation eTicketing System")).click();
- username = driver.findElement(By.id("usernameId")).getTagName();
- password = driver.findElement(By.className("loginPassword")).getTagName();
- System.out.println(username);
- System.out.println(password);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement