title: equals is not working in inside for loop
body: <p>this is replica of one of my client application. i want to test negative scenario like the value i give should not available in the dropdown list. i am going to take the j value for assert functionality. if j value is not 1, the value i give is not in the drop down list.</p>
  
  <p>for below program, i am expecting j value to 1 but its showing 0 only. why iqual ignore case is not working inside for loop but it is working outside forloop. i am even listed all the values inside the forloop, it has "May" value.</p>
  
  <p>is there any simple script to check the value i give is not in the dropdown list?? </p>
  
  <pre><code>package Facebook;
  
  import java.util.List;
  
  import org.openqa.selenium.By;
  import org.openqa.selenium.Keys;
  import org.openqa.selenium.WebDriver;
  import org.openqa.selenium.WebElement;
  import org.openqa.selenium.chrome.ChromeDriver;
  import org.openqa.selenium.firefox.FirefoxDriver;
  import org.openqa.selenium.support.ui.Select;
  import org.testng.annotations.Test;
  
  public class Login2 {
  
      @Test
      public void Login() throws InterruptedException {
          System.setProperty("webdriver.chrome.driver",
                  "D:\\Besent Technology\\Drivers\\chromedriver_win32_2.34\\chromedriver.exe");
          WebDriver driver = new ChromeDriver();
          driver.get("https://www.facebook.com/");
  
          List&lt;WebElement&gt; monthlist = driver.findElements(By.id("month"));
  
          String month = "May";
          String mon = "May";
          int i = 0;
          int j = 0;
  
          if (mon.equals(month)) {
              System.out.println(mon + " project should be selected");
              i++;
          }
  
          for (WebElement ele : monthlist) {
              String fbmonth = ele.getText().trim();
              System.out.println(ele.getText());
              if (fbmonth.equals(month)) {
                  System.out.println(fbmonth + " project is displaying");
                  j++;
              } else {
                  continue;
              }
  
          }
          System.out.println("print i value: " + i);
          System.out.println("print j value: " + j);
  
      }
  }
  </code></pre>
  
  <p>output</p>
  
  <pre><code>        [RemoteTestNG] detected TestNG version 6.14.2
          Starting ChromeDriver 2.34.522940 (1a76f96f66e3ca7b8e57d503b4dd3bccfba87af1) on port 3885
          Only local connections are allowed.
          Aug 13, 2018 7:18:16 PM org.openqa.selenium.remote.ProtocolHandshake createSession
          INFO: Detected dialect: OSS
          May project should be selected
          Month
          Jan
          Feb
          Mar
          Apr
          May
          Jun
          Jul
          Aug
          Sept
          Oct
          Nov
          Dec
          print i value: 1
          print j value: 0
          PASSED: Login
  
          ===============================================
              Default test
              Tests run: 1, Failures: 0, Skips: 0
          ===============================================
  
  
          ===============================================
          Default suite
          Total tests run: 1, Failures: 0, Skips: 0
          ===============================================
  </code></pre>