title: Implement array in Selenium WebDriver using Java
body: <p>I am planning to use Array to test Gmail login. You may have noticed that Gmail login 1st verifies username. I want to declare an array variable where I want to keep</p>
  
  <blockquote>
    <p>{"#John@gmail.com","John$u@gmail.com","john14@gmail.com"}</p>
  </blockquote>
  
  <p>A few things I am getting confused about is how to send 1 name at a time and verify it.</p>
  
  <p>Example:</p>
  
  <pre><code>    f.findElement(By.id("EMail")).sendKeys("$jon@gmail.com");
      //code below to get sendKeys value
      WebElement w= f.findElement(By.id("Email"));
      String emailID= w.getAttribute("value");
      System.out.println("Email id used " + emailID);
      if((emailID).contains(" # $")){
          System.out.println("Invalid character");
      }
  </code></pre>
  
  <p><strong><em>Confusion</em></strong>: How to implement sending 1 name at a time and verify for invalid character and when it matches john14@gmail.com then print correct email address?</p>