Class ReferenceNameGenerator

java.lang.Object
com.vaadin.testbench.screenshot.ReferenceNameGenerator

public class ReferenceNameGenerator extends Object
Generates the name of a reference screen shot from a string ID and browser information.
  • Constructor Details

    • ReferenceNameGenerator

      public ReferenceNameGenerator()
  • Method Details

    • generateName

      public String generateName(String referenceId, org.openqa.selenium.Capabilities browserCapabilities)
      Generates the actual name of a reference screen shot from a reference ID and browser information.
      Parameters:
      referenceId - the reference ID
      browserCapabilities - a Capabilities instance containing information on the browser.
      Returns:
      The actual name.
    • getMajorVersion

      public static String getMajorVersion(org.openqa.selenium.Capabilities browserCapabilities)
      Finds the major version by parsing the browser version string.
      Parameters:
      browserCapabilities - the capabilities object holding the version information
      Returns:
      the major version of the browser.