How to get PNR Status in IRCTC using Automation.

package Testing_Pack;


import org.openqa.selenium.WebDriver;
import org.openqa.selenium.By;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class mytestclass {

public static void main(String[] args) {

System.setProperty("webdriver.chrome.driver", "/home/techens/chromedriver/chromedriver");


 WebDriver driver=new ChromeDriver(); //Created an object "driver" contains function Chrome Driver driver.navigate().to("https://www.trainspnrstatus.com/"); // Navigate to URL driver.findElement(By.id("fullname")).sendKeys("2808506351"); //enter 10 digit PNR number driver.findElement(By.cssSelector("#contact_form > div > button")).click(); //Clicks on "Check" button
}
}


Comments

  1. I found your this post while searching for information about blog-related research ... It's a good post .. keep posting and updating information. train pnr status

    ReplyDelete
    Replies
    1. Thank you for your support I ensure you i will keep updating this blog for any specific scenario please revert back on creativesplanet57@gmail.com

      Delete

Post a Comment

Popular posts from this blog

Book ticket online through IRCTC using Selenium Webdriver.

How to create a New Gmail Account using Selenium Web Driver.

SQL Injection.