title: How to resolve Can inject only one of <ITestContext, XmlTest> into a BeforeTest annotated setBrowser error
body: <p>I have @BeforeTest and @AfterTest Annotations used. Please find below code</p>
  
  <pre><code>WebDriverFactory wd =  new WebDriverFactory();
  
      //@Parameters({"browserName","appURL"})
      @BeforeTest
      public void setBrowser(String browserName, String appURL){
          wd.setDriver("chrome", "https:URL");
      }
  
      @AfterTest
      public void tearDown()
      {
          wd.closeBrowser();
      }
  </code></pre>
  
  <p>And getting below error</p>
  
  <p>AILED CONFIGURATION: @BeforeTest setBrowser
  org.testng.TestNGException: 
  Can inject only one of  into a BeforeTest annotated setBrowser.
  For more information on native dependency injection please refer to <a href="http://testng.org/doc/documentation-main.html#native-dependency-injection" rel="nofollow noreferrer">http://testng.org/doc/documentation-main.html#native-dependency-injection</a>
      at org.testng.internal.Parameters.checkParameterTypes(Parameters.java:244)
      at org.testng.internal.Parameters.createParameters(Parameters.java:172)</p>