Google+

Using Selenium Test Automation - Enter User Credentials and click SingIn button in SignIn page of VerizonWireless site

The below is the problem and solution code for providing the credentials and clicking SignIn button on the sign in page of  VerizonWireless.com site:

Problem:




Solution :


public class Demo {

   public static void main(String[] args) {
  
         WebDriver driver = new FirefoxDriver();
  
         driver.manage().window().maximize();
  
         driver.get("https://www.verizonwireless.com/my-verizon/");
  
         //Switch to the frame in which the Username, Password and SigIn button options are avaiable
         driver.switchTo().frame(0);
  
         driver.findElement(By.id("IDToken1")).sendKeys("SampleUsername");
         driver.findElement(By.id("IDToken2")).sendKeys("SamplePassword");
         driver.findElement(By.id("login-submit")).click();
  

   }

}

No comments: