Skip to content

Instantly share code, notes, and snippets.

@muditlambda
Created December 5, 2019 11:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save muditlambda/39003023ccfb0d9806e4d0409c75dd98 to your computer and use it in GitHub Desktop.
Save muditlambda/39003023ccfb0d9806e4d0409c75dd98 to your computer and use it in GitHub Desktop.
package parameterization;
import org.testng.annotations.Test;
import org.testng.annotations.Parameters;
public class ParameterPass {
@Parameters("browser")
@Test
public void test1(String browser) {
if(browser.equalsIgnoreCase("FF"))
{
System.out.println("The browser value is : " +browser);
}else if(browser.equalsIgnoreCase("Chrome"))
{
System.out.println("The browser value is : " +browser);
}else if(browser.equalsIgnoreCase("IE"))
{
System.out.println("The browser value is : " +browser);
}
else
{
System.out.println("Incorrect browser value passed.");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment