0

I want to run my test in three different preset resolution: 768x1024, 360x740, 1920x1024 using the existing framework. And I have to use system properties to pass parameters to the runner/maven build. I've tried systemPropertyVariable. It worked fine with one resolution size but I don't know how to pass all the three preset resolutions.

private static void setupBrowser(final WebDriver webDriver) {

    String width=System.getProperty("width");
    String heigth=System.getProperty("heigth");
    
    final Dimension targetResolution = new Dimension(Integer.parseInt(width),Integer.parseInt(heigth));

here my systemPropertyVariables:

<configuration>
    <systemPropertyVariables>
        <width>768</width>
        <heigth>1024</heigth>
    </systemPropertyVariables>
    <suiteXmlFiles>
        <suiteXmlFile>testng.xml</suiteXmlFile>
    </suiteXmlFiles>
</configuration>
Daniel Widdis
  • 8,424
  • 13
  • 41
  • 63

0 Answers0