chrome_xml.d.ts 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. import { BinaryUrl } from './binary';
  2. import { XmlConfigSource } from './config_source';
  3. export declare class ChromeXml extends XmlConfigSource {
  4. maxVersion: string;
  5. constructor();
  6. getUrl(version: string): Promise<BinaryUrl>;
  7. /**
  8. * Get a list of chrome drivers paths available for the configuration OS type and architecture.
  9. */
  10. getVersionList(): Promise<string[]>;
  11. /**
  12. * Helper method, gets the ostype and gets the name used by the XML
  13. */
  14. getOsTypeName(): string;
  15. /**
  16. * Gets the latest item from the XML.
  17. */
  18. private getLatestChromeDriverVersion();
  19. /**
  20. * Gets a specific item from the XML.
  21. */
  22. private getSpecificChromeDriverVersion(inputVersion);
  23. }
  24. /**
  25. * Chromedriver is the only binary that does not conform to semantic versioning
  26. * and either has too little number of digits or too many. To get this to be in
  27. * semver, we will either add a '.0' at the end or chop off the last set of
  28. * digits. This is so we can compare to find the latest and greatest.
  29. *
  30. * Example:
  31. * 2.46 -> 2.46.0
  32. * 75.0.3770.8 -> 75.0.3770
  33. *
  34. * @param version
  35. */
  36. export declare function getValidSemver(version: string): string;