Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

constants.js 4.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.CHANNEL_FIREFOX_TRUNK = exports.CHANNEL_FIREFOX_NIGHTLY = exports.VENDOR_PREFIX = exports.BROWSER_ERROR_MESSAGES = exports.ERROR_MESSAGES = exports.PPTR_LOG_PREFIX = exports.SERIALIZE_FLAG = exports.SERIALIZE_PROPERTY = exports.SUPPORTED_SELECTOR_STRATEGIES = exports.DEFAULT_SCRIPT_TIMEOUT = exports.DEFAULT_PAGELOAD_TIMEOUT = exports.DEFAULT_IMPLICIT_TIMEOUT = exports.DEFAULTS = exports.BROWSER_TYPE = exports.SUPPORTED_BROWSER = exports.EDGE_NAMES = exports.FIREFOX_NAMES = exports.CHROME_NAMES = exports.DEFAULT_FLAGS = exports.ELEMENT_KEY = exports.DEFAULT_Y_POSITION = exports.DEFAULT_X_POSITION = exports.DEFAULT_HEIGHT = exports.DEFAULT_WIDTH = void 0;
  4. exports.DEFAULT_WIDTH = 1200;
  5. exports.DEFAULT_HEIGHT = 900;
  6. exports.DEFAULT_X_POSITION = 0;
  7. exports.DEFAULT_Y_POSITION = 0;
  8. exports.ELEMENT_KEY = 'element-6066-11e4-a52e-4f735466cecf';
  9. exports.DEFAULT_FLAGS = [
  10. '--enable-automation',
  11. '--disable-popup-blocking',
  12. '--disable-extensions',
  13. '--disable-background-networking',
  14. '--disable-background-timer-throttling',
  15. '--disable-backgrounding-occluded-windows',
  16. '--disable-sync',
  17. '--metrics-recording-only',
  18. '--disable-default-apps',
  19. '--mute-audio',
  20. '--no-first-run',
  21. '--no-default-browser-check',
  22. '--disable-hang-monitor',
  23. '--disable-prompt-on-repost',
  24. '--disable-client-side-phishing-detection',
  25. '--password-store=basic',
  26. '--use-mock-keychain',
  27. '--disable-component-extensions-with-background-pages',
  28. '--disable-breakpad',
  29. '--disable-dev-shm-usage',
  30. '--disable-ipc-flooding-protection',
  31. '--disable-renderer-backgrounding',
  32. '--force-fieldtrials=*BackgroundTracing/default/',
  33. '--enable-features=NetworkService,NetworkServiceInProcess',
  34. '--disable-features=site-per-process,TranslateUI,BlinkGenPropertyTrees'
  35. ];
  36. exports.CHROME_NAMES = ['chrome', 'googlechrome', 'headlesschrome', 'google-chrome', 'chromium'];
  37. exports.FIREFOX_NAMES = ['firefox', 'ff', 'mozilla', 'mozillafirefox', 'headless firefox', 'headlessfirefox'];
  38. exports.EDGE_NAMES = ['edge', 'msedge', 'microsoft-edge', 'microsoftedge'];
  39. exports.SUPPORTED_BROWSER = [...exports.CHROME_NAMES, ...exports.FIREFOX_NAMES, ...exports.EDGE_NAMES];
  40. exports.BROWSER_TYPE = {
  41. chrome: 'chrome',
  42. firefox: 'firefox',
  43. edge: 'edge'
  44. };
  45. exports.DEFAULTS = {
  46. capabilities: {
  47. type: 'object',
  48. required: true
  49. },
  50. logLevel: {
  51. type: 'string',
  52. default: 'info',
  53. match: /(trace|debug|info|warn|error|silent)/
  54. },
  55. outputDir: {
  56. type: 'string'
  57. },
  58. connectionRetryCount: {
  59. type: 'number',
  60. default: 50
  61. }
  62. };
  63. exports.DEFAULT_IMPLICIT_TIMEOUT = 0;
  64. exports.DEFAULT_PAGELOAD_TIMEOUT = 5 * 60 * 1000;
  65. exports.DEFAULT_SCRIPT_TIMEOUT = 30 * 1000;
  66. exports.SUPPORTED_SELECTOR_STRATEGIES = ['css selector', 'tag name', 'xpath', 'link text', 'partial link text'];
  67. exports.SERIALIZE_PROPERTY = 'data-devtoolsdriver-fetchedElement';
  68. exports.SERIALIZE_FLAG = '__executeElement';
  69. exports.PPTR_LOG_PREFIX = 'puppeteer:protocol';
  70. exports.ERROR_MESSAGES = {
  71. staleElement: {
  72. name: 'stale element reference',
  73. message: 'stale element reference: The element reference is stale; either the element is no longer attached to the DOM, it is not in the current frame context, or the document has been refreshed'
  74. }
  75. };
  76. exports.BROWSER_ERROR_MESSAGES = {
  77. firefoxNightly: `Only Nightly release channel is supported in Devtools/Puppeteer for Firefox. Refer to the following issue:
  78. https://bugzilla.mozilla.org/show_bug.cgi?id=1606604
  79. You can use the following link to download Firefox Nightly edition:
  80. https://www.mozilla.org/en-US/firefox/channel/desktop/
  81. Adding the following binary capability in Firefox Options is mandatory to run with Nightly edition:
  82. 'moz:firefoxOptions': {
  83. binary: '/path/to/firefox'
  84. }
  85. Note: "Nightly" as a term should be present in the "Firefox Application Name" across all OS's in binary path mentioned above for this to work.`
  86. };
  87. exports.VENDOR_PREFIX = {
  88. chrome: 'goog:chromeOptions',
  89. firefox: 'moz:firefoxOptions',
  90. edge: 'ms:edgeOptions'
  91. };
  92. exports.CHANNEL_FIREFOX_NIGHTLY = 'nightly';
  93. exports.CHANNEL_FIREFOX_TRUNK = 'trunk';