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.

reloadSession.js 914B

1234567891011121314151617181920212223
  1. "use strict";
  2. var __importDefault = (this && this.__importDefault) || function (mod) {
  3. return (mod && mod.__esModule) ? mod : { "default": mod };
  4. };
  5. Object.defineProperty(exports, "__esModule", { value: true });
  6. const logger_1 = __importDefault(require("@wdio/logger"));
  7. const log = logger_1.default('webdriverio');
  8. async function reloadSession() {
  9. const oldSessionId = this.sessionId;
  10. try {
  11. await this.deleteSession();
  12. }
  13. catch (err) {
  14. log.warn(`Suppressing error closing the session: ${err.stack}`);
  15. }
  16. const ProtocolDriver = require(this.options.automationProtocol).default;
  17. await ProtocolDriver.reloadSession(this);
  18. if (Array.isArray(this.options.onReload) && this.options.onReload.length) {
  19. await Promise.all(this.options.onReload.map((hook) => hook(oldSessionId, this.sessionId)));
  20. }
  21. return this.sessionId;
  22. }
  23. exports.default = reloadSession;