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.

isDisplayed.js 1.1KB

123456789101112131415161718192021222324252627
  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 constants_1 = require("../../constants");
  7. const utils_1 = require("../../utils");
  8. const isElementDisplayed_1 = __importDefault(require("../../scripts/isElementDisplayed"));
  9. const noW3CEndpoint = ['microsoftedge', 'safari', 'chrome', 'safari technology preview'];
  10. async function isDisplayed() {
  11. var _a;
  12. const browser = utils_1.getBrowserObject(this);
  13. if (!await utils_1.hasElementId(this)) {
  14. return false;
  15. }
  16. const useAtom = (browser.isDevTools ||
  17. (browser.isW3C &&
  18. !browser.isMobile &&
  19. noW3CEndpoint.includes((_a = browser.capabilities.browserName) === null || _a === void 0 ? void 0 : _a.toLowerCase())));
  20. return useAtom
  21. ? await browser.execute(isElementDisplayed_1.default, {
  22. [constants_1.ELEMENT_KEY]: this.elementId,
  23. ELEMENT: this.elementId
  24. }) :
  25. await this.isElementDisplayed(this.elementId);
  26. }
  27. exports.default = isDisplayed;