title: testNG parallel execution not working
body: <p>I am trying to run following test in parallel for two browsers using testNG, while running both the browsers are getting launched with the URL, but the complete test execution is happening for only one browser.</p>
  
  <p>Here is my Test Suite class</p>
  
  <pre><code>@Test (groups = {"Enable"}) 
  @SuppressWarnings("unused")
  public class EETestSuite_01 extends ApplicationFunctions{
      String URL = Globals.GC_EMPTY;
  
      @BeforeTest
      @Parameters("browser")
      public void loadTest(String browser) throws IOException{
          InitializeTestEnv("EE|BizApp");
          if(browser.equalsIgnoreCase("Firefox"))
                 GetBrowser("Firefox");
              else if(browser.equalsIgnoreCase("Chrome")){
                 GetBrowser("Chrome");
              }
  
      }
  
      @AfterMethod
      public void cleartest() throws InterruptedException{
          driver.close();
          driver.quit();
          driver = null;
      }
  
  
      public void TC001_Phone_First_Acquisition_Journey_PAYM() throws InterruptedException{
          URL = EnvDetail.get(Globals.GC_HOME_PAGE);
          Map&lt;String,String&gt; TDChoosePlan = null;
          TDChoosePlan = getData(appName+Globals.GC_TEST_DATA_SHEET,"ChoosePlan",1);
          try{
              launchApp(URL); 
              //driver.navigate().to("javascript:document.getElementById('overridelink').click()");
              EEHomePage homePage = PageFactory.initElements(driver, EEHomePage.class);
              EEShopPage shopPage = homePage.GetToShopPage();
              EEPhoneMatrixPage phonePage = shopPage.GetToPhoneMatrixPage();
              EEChoosePlanPage planPage = phonePage.ChoosePhone("NokiaLumia1020"); // Implement select phone
              EEAddonsPage addonPage = planPage.SelectPhonesPlan(TDChoosePlan);
              EEBasket basketPage = addonPage.GoToBasketPage();
              EESecureCheckOut secureChkOutPage = basketPage.GoToSecureCheckOutPage();
              secureChkOutPage.ChooseNonExistingCustomer();
              EEConfirmation confPage = secureChkOutPage.FillUserRegisterForm(2);
          }catch(Exception e){
              e.printStackTrace();
          }       
      }
  
  
  }
  </code></pre>
  
  <p>My XML looks like this</p>
  
  <pre><code>&lt;!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"&gt;
  &lt;suite name = "EEAutomationTestSuite" verbose="2" parallel = "tests" thread-count="100"&gt;
  
  &lt;test name="PAYM Acquisition in Chrome"&gt;
    &lt;parameter name="browser" value="Firefox"&gt;&lt;/parameter&gt;
     &lt;classes&gt;
       &lt;class name="com.testsuite.EETestSuite_01"&gt;
      &lt;/class&gt;
    &lt;/classes&gt;
  &lt;/test&gt;
  
  &lt;test name="PAYM Acquisition in FF"&gt;
    &lt;parameter name="browser" value="Firefox"&gt;&lt;/parameter&gt;
     &lt;classes&gt;
       &lt;class name="com.testsuite.EETestSuite_01"&gt;
      &lt;/class&gt;
    &lt;/classes&gt;
  &lt;/test&gt;
  &lt;/suite&gt;
  </code></pre>
  
  <p>And my code for the Home page is this</p>
  
  <pre><code>*/  public EEShopPage GetToShopPage() throws InterruptedException{
  
         // longWait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector(OR.getProperty("wblShopHeader"))));   
          lblShopHeader = driver.findElement(By.cssSelector(OR.getProperty("wblShopHeader")));
          Actions builder = new Actions(driver); 
          Actions hoverOverRegistrar = builder.moveToElement(lblShopHeader);
          hoverOverRegistrar.perform();Thread.sleep(10000);
          lnkStartShopping = driver.findElement(By.cssSelector(OR.getProperty("lnkStartShopping")));
          mediumWait.until(ExpectedConditions.elementToBeClickable(By.cssSelector(OR.getProperty("lnkStartShopping"))));
          lnkStartShopping.click();
          return PageFactory.initElements(driver,EEShopPage.class );
      }
  }
  </code></pre>
  
  <p>Here is the driver </p>
  
  <pre><code>public static void GetBrowser(String browser){
          try{
              if (browser.equalsIgnoreCase("firefox")) {              
  //              FirefoxProfile firefoxProfile = new FirefoxProfile();
  //              File pathToBinary = new File(Globals.GC_FIREFOX_BIN_PATH);
  //              FirefoxBinary ffBinary = new FirefoxBinary(pathToBinary);
                  //firefoxProfile.setPreference("webdriver.load.strategy","unstable");
                  driver = new FirefoxDriver();
              } else if (browser.equalsIgnoreCase("iexplorer")){
                  System.setProperty("webdriver.ie.driver", System.getProperty("user.dir") + 
                                     "//resource//drivers//IEDriverServer.exe");          
                  DesiredCapabilities capabilities = new DesiredCapabilities(); 
                  capabilities.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
                  driver = new InternetExplorerDriver(capabilities);
              } else if (browser.equalsIgnoreCase("chrome")){
                  System.setProperty("webdriver.chrome.driver", System.getProperty("user.dir") + 
                                     "//resource//drivers//chromedriver.exe");
  </code></pre>
  
  <p>I am just guessing that there is a hover action in the home page, and for one browser it works fine but for the other nothing happens.... is it due focus issue ??</p>
  
  <p>Please let me know how to solve this with an example</p>