0

Currently we are using ENUM to switch between whether I need to execute on Local Chrome, Local Firefox, Perfecto Remote. Can we have a way where in for perfecto remote execution while runtime(from jenkins) I pass the text to run either on Chrome or Firefox since most Capabilities Options are same.

Do we have something of parent options so that we can switch instead of creating different switch cases for Perfecto_Chrome & Perfecto_Firefox (and avoid duplicacy. I know I can create a class for options and call it but I would prefer this way if there is an option and I don't know)?

String browser =  System.getenv("browser"); // This comes from jenkins parameter
ParentOptions options1;
if(browser.equals("chrome"))
    options1 = new  ChromeOptions();
else if (browser.equals("firefox"))
    options1 = new FirefoxOptions();

Likewise I switch between the firefox and Chrome options internally under one switch case?

Suraj Gupta
  • 390
  • 1
  • 9
  • 25

0 Answers0