I am making a selenium webdriver and I have 25 apps and 4 environments. I have them set up as enums so I can give specific command line arguments. Right now I have it working so that it takes one app and then one environment in that order. I need to be able to do something like
-app app1 app2 app3 -env env1 env2
I need it to either take no arguments, either arguments, or both arguments. This is what I have so far.
if (args.length == 0)
{
LogIn.loginTest(testResults);
DatabaseTest.testResults(testResults);
LinkTest.linkTests(testResults);
}
else
{
// First choose application, then choose environment
Application.chooseAppTest(args);
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…