Commit 2d404eba authored by Natalia Csoregi's avatar Natalia Csoregi
Browse files

Backed out 8 changesets (bug 1830884, bug 1822466) for causing regressions in...

Backed out 8 changesets (bug 1830884, bug 1822466) for causing regressions in the upstream wpt tests. a=backout

Backed out changeset 7f4052a38bc6 (bug 1830884)
Backed out changeset 67d5d6a5f321 (bug 1830884)
Backed out changeset 77f0334c7976 (bug 1830884)
Backed out changeset 31607d74ee69 (bug 1830884)
Backed out changeset 256239106623 (bug 1822466)
Backed out changeset d94b6d6cd713 (bug 1822466)
Backed out changeset 2c6d325cb248 (bug 1822466)
Backed out changeset b89608b3c46a (bug 1822466)
parent 11a4d97a
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -57,7 +57,6 @@ remote.jar:
  content/shared/webdriver/Actions.sys.mjs (shared/webdriver/Actions.sys.mjs)
  content/shared/webdriver/Assert.sys.mjs (shared/webdriver/Assert.sys.mjs)
  content/shared/webdriver/Capabilities.sys.mjs (shared/webdriver/Capabilities.sys.mjs)
  content/shared/webdriver/Element.sys.mjs (shared/webdriver/Element.sys.mjs)
  content/shared/webdriver/Errors.sys.mjs (shared/webdriver/Errors.sys.mjs)
  content/shared/webdriver/KeyData.sys.mjs (shared/webdriver/KeyData.sys.mjs)
  content/shared/webdriver/NodeCache.sys.mjs (shared/webdriver/NodeCache.sys.mjs)
+7 −161
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
  accessibility: "chrome://remote/content/marionette/accessibility.sys.mjs",
  action: "chrome://remote/content/shared/webdriver/Actions.sys.mjs",
  atom: "chrome://remote/content/marionette/atom.sys.mjs",
  element: "chrome://remote/content/shared/webdriver/Element.sys.mjs",
  element: "chrome://remote/content/marionette/element.sys.mjs",
  error: "chrome://remote/content/shared/webdriver/Errors.sys.mjs",
  evaluate: "chrome://remote/content/marionette/evaluate.sys.mjs",
  interaction: "chrome://remote/content/marionette/interaction.sys.mjs",
@@ -21,7 +21,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
  Log: "chrome://remote/content/shared/Log.sys.mjs",
  sandbox: "chrome://remote/content/marionette/evaluate.sys.mjs",
  Sandboxes: "chrome://remote/content/marionette/evaluate.sys.mjs",
  WebReference: "chrome://remote/content/marionette/web-reference.sys.mjs",
});

XPCOMUtils.defineLazyGetter(lazy, "logger", () =>
@@ -59,10 +58,6 @@ export class MarionetteCommandsChild extends JSWindowActorChild {
    return this._legacyactions;
  }

  get #nodeCache() {
    return this.#processActor.getNodeCache();
  }

  actorCreated() {
    lazy.logger.trace(
      `[${this.browsingContext.id}] MarionetteCommands actor created ` +
@@ -87,12 +82,11 @@ export class MarionetteCommandsChild extends JSWindowActorChild {
      let waitForNextTick = false;

      const { name, data: serializedData } = msg;
      const data = await lazy.json.deserialize({
        value: serializedData,
        browsingContext: this.contentWindow.browsingContext,
        getKnownElement: this.#getKnownElement.bind(this),
        getKnownShadowRoot: this.#getKnownShadowRoot.bind(this),
      });
      const data = lazy.json.deserialize(
        serializedData,
        this.#processActor.getNodeCache(),
        this.contentWindow
      );

      switch (name) {
        case "MarionetteCommandsParent:clearElement":
@@ -190,11 +184,7 @@ export class MarionetteCommandsChild extends JSWindowActorChild {
      }

      return {
        data: await lazy.json.clone({
          value: result,
          getOrCreateNodeReference: this.#getOrCreateNodeReference.bind(this),
          browsingContext: this.contentWindow.browsingContext,
        }),
        data: lazy.json.clone(result, this.#processActor.getNodeCache()),
      };
    } catch (e) {
      // Always wrap errors as WebDriverError
@@ -616,148 +606,4 @@ export class MarionetteCommandsChild extends JSWindowActorChild {

    return { browsingContextId: browsingContext.id };
  }

  // Private methods

  /**
   * Resolve element from specified web reference identifier.
   *
   * @param {BrowsingContext} browsingContext
   *     The browsing context to retrieve the element from.
   * @param {string} nodeId
   *     The WebReference uuid for a DOM element.
   *
   * @returns {Element}
   *     The DOM element that the identifier was generated for.
   *
   * @throws {NoSuchElementError}
   *     If the element doesn't exist in the current browsing context.
   * @throws {StaleElementReferenceError}
   *     If the element has gone stale, indicating its node document is no
   *     longer the active document or it is no longer attached to the DOM.
   */
  async #getKnownElement(browsingContext, nodeId) {
    const isKnown = await this.#isNodeReferenceKnown(browsingContext, nodeId);
    if (!isKnown) {
      throw new lazy.error.NoSuchElementError(
        `The element with the reference ${nodeId} is not known in the current browsing context`
      );
    }

    const node = this.#nodeCache.getNode(browsingContext, nodeId);

    // Ensure the node is of the correct Node type.
    if (node !== null && !lazy.element.isElement(node)) {
      throw new lazy.error.NoSuchElementError(
        `The element with the reference ${nodeId} is not of type HTMLElement`
      );
    }

    // If null, which may be the case if the element has been unwrapped from a
    // weak reference, it is always considered stale.
    if (node === null || lazy.element.isStale(node)) {
      throw new lazy.error.StaleElementReferenceError(
        `The element with the reference ${nodeId} ` +
          "is stale; either its node document is not the active document, " +
          "or it is no longer connected to the DOM"
      );
    }

    return node;
  }

  /**
   * Resolve ShadowRoot from specified web reference identifier.
   *
   * @param {BrowsingContext} browsingContext
   *     The browsing context to retrieve the shadow root from.
   * @param {string} nodeId
   *     The WebReference uuid for a ShadowRoot.
   *
   * @returns {ShadowRoot}
   *     The ShadowRoot that the identifier was generated for.
   *
   * @throws {NoSuchShadowRootError}
   *     If the ShadowRoot doesn't exist in the current browsing context.
   * @throws {DetachedShadowRootError}
   *     If the ShadowRoot is detached, indicating its node document is no
   *     longer the active document or it is no longer attached to the DOM.
   */
  async #getKnownShadowRoot(browsingContext, nodeId) {
    const isKnown = await this.#isNodeReferenceKnown(browsingContext, nodeId);
    if (!isKnown) {
      throw new lazy.error.NoSuchShadowRootError(
        `The shadow root with the reference ${nodeId} is not known in the current browsing context`
      );
    }

    const node = this.#nodeCache.getNode(browsingContext, nodeId);

    // Ensure the node is of the correct Node type.
    if (node !== null && !lazy.element.isShadowRoot(node)) {
      throw new lazy.error.NoSuchShadowRootError(
        `The shadow root with the reference ${nodeId} is not of type ShadowRoot`
      );
    }

    // If null, which may be the case if the element has been unwrapped from a
    // weak reference, it is always considered stale.
    if (node === null || lazy.element.isDetached(node)) {
      throw new lazy.error.DetachedShadowRootError(
        `The shadow root with the reference ${nodeId} ` +
          "is detached; either its node document is not the active document, " +
          "or it is no longer connected to the DOM"
      );
    }

    return node;
  }

  /**
   * Returns the WebReference for the given node.
   *
   * Hereby it tries to find a known node reference for that node in the
   * node cache, and returns it. Otherwise it creates a new reference and
   * adds it to the cache.
   *
   * @param {BrowsingContext} browsingContext
   *     The browsing context the element is part of.
   * @param {Node} node
   *     The node to create or get a WebReference for.
   *
   * @returns {WebReference} The web reference for the node.
   */
  async #getOrCreateNodeReference(browsingContext, node) {
    const nodeRef = this.#nodeCache.getOrCreateNodeReference(node);
    const webRef = lazy.WebReference.from(node, nodeRef);

    await this.sendQuery("MarionetteCommandsChild:addNodeToSeenNodes", {
      browsingContext,
      nodeId: webRef.uuid,
    });

    return webRef;
  }

  /**
   * Determines if the node reference is known for the given browsing context.
   *
   * For WebDriver classic only nodes from the same browsing context are
   * allowed to be accessed.
   *
   * @param {BrowsingContext} browsingContext
   *     The browsing context the element has to be part of.
   * @param {ElementIdentifier} nodeId
   *     The WebElement reference identifier for a DOM element.
   *
   * @returns {Promise<boolean>}
   *     A promise that resolved to True if the element is known in the given
   *     browsing context.
   */
  #isNodeReferenceKnown(browsingContext, nodeId) {
    return this.sendQuery("MarionetteCommandsChild:isNodeReferenceKnown", {
      browsingContext,
      nodeId,
    });
  }
}
+1 −35
Original line number Diff line number Diff line
@@ -10,17 +10,12 @@ ChromeUtils.defineESModuleGetters(lazy, {
  capture: "chrome://remote/content/shared/Capture.sys.mjs",
  error: "chrome://remote/content/shared/webdriver/Errors.sys.mjs",
  Log: "chrome://remote/content/shared/Log.sys.mjs",
  session: "chrome://remote/content/shared/webdriver/Session.sys.mjs",
});

XPCOMUtils.defineLazyGetter(lazy, "logger", () =>
  lazy.Log.get(lazy.Log.TYPES.MARIONETTE)
);

// Because Marionette supports a single session only we store its id
// globally so that the parent actor can access it.
let webDriverSessionId = null;

export class MarionetteCommandsParent extends JSWindowActorParent {
  actorCreated() {
    this._resolveDialogOpened = null;
@@ -32,28 +27,6 @@ export class MarionetteCommandsParent extends JSWindowActorParent {
    });
  }

  async receiveMessage(msg) {
    const { name, data } = msg;

    switch (name) {
      case "MarionetteCommandsChild:addNodeToSeenNodes":
        return lazy.session.addNodeToSeenNodes(
          webDriverSessionId,
          data.browsingContext,
          data.nodeId
        );

      case "MarionetteCommandsChild:isNodeReferenceKnown":
        return lazy.session.isNodeReferenceKnown(
          webDriverSessionId,
          data.browsingContext,
          data.nodeId
        );
    }

    return null;
  }

  async sendQuery(name, data) {
    // return early if a dialog is opened
    const result = await Promise.race([
@@ -377,11 +350,8 @@ export function getMarionetteCommandsActorProxy(browsingContextFn) {

/**
 * Register the MarionetteCommands actor that holds all the commands.
 *
 * @param {string} sessionId
 *     The id of the current WebDriver session.
 */
export function registerCommandsActor(sessionId) {
export function registerCommandsActor() {
  try {
    ChromeUtils.registerWindowActor("MarionetteCommands", {
      kind: "JSWindowActor",
@@ -404,12 +374,8 @@ export function registerCommandsActor(sessionId) {
      throw e;
    }
  }

  webDriverSessionId = sessionId;
}

export function unregisterCommandsActor() {
  webDriverSessionId = null;

  ChromeUtils.unregisterWindowActor("MarionetteCommands");
}
+43 −45
Original line number Diff line number Diff line
@@ -4,6 +4,12 @@

import { XPCOMUtils } from "resource://gre/modules/XPCOMUtils.sys.mjs";

import {
  element,
  ShadowRoot,
  WebElement,
} from "chrome://remote/content/marionette/element.sys.mjs";

const lazy = {};

ChromeUtils.defineESModuleGetters(lazy, {
@@ -18,7 +24,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
  DebounceCallback: "chrome://remote/content/marionette/sync.sys.mjs",
  disableEventsActor:
    "chrome://remote/content/marionette/actors/MarionetteEventsParent.sys.mjs",
  element: "chrome://remote/content/shared/webdriver/Element.sys.mjs",
  enableEventsActor:
    "chrome://remote/content/marionette/actors/MarionetteEventsParent.sys.mjs",
  error: "chrome://remote/content/shared/webdriver/Errors.sys.mjs",
@@ -39,7 +44,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
  registerCommandsActor:
    "chrome://remote/content/marionette/actors/MarionetteCommandsParent.sys.mjs",
  RemoteAgent: "chrome://remote/content/components/RemoteAgent.sys.mjs",
  ShadowRoot: "chrome://remote/content/marionette/web-reference.sys.mjs",
  TabManager: "chrome://remote/content/shared/TabManager.sys.mjs",
  TimedPromise: "chrome://remote/content/marionette/sync.sys.mjs",
  Timeouts: "chrome://remote/content/shared/webdriver/Capabilities.sys.mjs",
@@ -51,7 +55,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
    "chrome://remote/content/shared/Navigate.sys.mjs",
  waitForObserverTopic: "chrome://remote/content/marionette/sync.sys.mjs",
  WebDriverSession: "chrome://remote/content/shared/webdriver/Session.sys.mjs",
  WebElement: "chrome://remote/content/marionette/web-reference.sys.mjs",
  windowManager: "chrome://remote/content/shared/WindowManager.sys.mjs",
  WindowState: "chrome://remote/content/marionette/browser.sys.mjs",
});
@@ -62,21 +65,16 @@ XPCOMUtils.defineLazyGetter(lazy, "logger", () =>

const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";

XPCOMUtils.defineLazyGetter(
  lazy,
  "supportedStrategies",
  () =>
    new Set([
      lazy.element.Strategy.ClassName,
      lazy.element.Strategy.Selector,
      lazy.element.Strategy.ID,
      lazy.element.Strategy.Name,
      lazy.element.Strategy.LinkText,
      lazy.element.Strategy.PartialLinkText,
      lazy.element.Strategy.TagName,
      lazy.element.Strategy.XPath,
    ])
);
const SUPPORTED_STRATEGIES = new Set([
  element.Strategy.ClassName,
  element.Strategy.Selector,
  element.Strategy.ID,
  element.Strategy.Name,
  element.Strategy.LinkText,
  element.Strategy.PartialLinkText,
  element.Strategy.TagName,
  element.Strategy.XPath,
]);

// Timeout used to abort fullscreen, maximize, and minimize
// commands if no window manager is present.
@@ -475,7 +473,7 @@ GeckoDriver.prototype.newSession = async function(cmd) {
      this.dialog = lazy.modal.findModalDialogs(this.curBrowser);
    }

    lazy.registerCommandsActor(this.currentSession.id);
    lazy.registerCommandsActor();
    lazy.enableEventsActor();

    Services.obs.addObserver(this, TOPIC_BROWSER_READY);
@@ -1361,7 +1359,7 @@ GeckoDriver.prototype.switchToFrame = async function(cmd) {
  // Bug 1495063: Elements should be passed as WebReference reference
  let byFrame;
  if (typeof el == "string") {
    byFrame = lazy.WebElement.fromUUID(el).toJSON();
    byFrame = WebElement.fromUUID(el).toJSON();
  } else if (el) {
    byFrame = el;
  }
@@ -1404,7 +1402,7 @@ GeckoDriver.prototype.singleTap = async function(cmd) {
  lazy.assert.open(this.getBrowsingContext());

  let { id, x, y } = cmd.parameters;
  let webEl = lazy.WebElement.fromUUID(id).toJSON();
  let webEl = WebElement.fromUUID(id).toJSON();

  await this.getActor().singleTap(
    webEl,
@@ -1487,7 +1485,7 @@ GeckoDriver.prototype.releaseActions = async function() {
GeckoDriver.prototype.findElement = async function(cmd) {
  const { element: el, using, value } = cmd.parameters;

  if (!lazy.supportedStrategies.has(using)) {
  if (!SUPPORTED_STRATEGIES.has(using)) {
    throw new lazy.error.InvalidSelectorError(
      `Strategy not supported: ${using}`
    );
@@ -1499,7 +1497,7 @@ GeckoDriver.prototype.findElement = async function(cmd) {

  let startNode;
  if (typeof el != "undefined") {
    startNode = lazy.WebElement.fromUUID(el).toJSON();
    startNode = WebElement.fromUUID(el).toJSON();
  }

  let opts = {
@@ -1541,7 +1539,7 @@ GeckoDriver.prototype.findElement = async function(cmd) {
GeckoDriver.prototype.findElementFromShadowRoot = async function(cmd) {
  const { shadowRoot, using, value } = cmd.parameters;

  if (!lazy.supportedStrategies.has(using)) {
  if (!SUPPORTED_STRATEGIES.has(using)) {
    throw new lazy.error.InvalidSelectorError(
      `Strategy not supported: ${using}`
    );
@@ -1553,7 +1551,7 @@ GeckoDriver.prototype.findElementFromShadowRoot = async function(cmd) {

  const opts = {
    all: false,
    startNode: lazy.ShadowRoot.fromUUID(shadowRoot).toJSON(),
    startNode: ShadowRoot.fromUUID(shadowRoot).toJSON(),
    timeout: this.currentSession.timeouts.implicit,
  };

@@ -1586,7 +1584,7 @@ GeckoDriver.prototype.findElementFromShadowRoot = async function(cmd) {
GeckoDriver.prototype.findElements = async function(cmd) {
  const { element: el, using, value } = cmd.parameters;

  if (!lazy.supportedStrategies.has(using)) {
  if (!SUPPORTED_STRATEGIES.has(using)) {
    throw new lazy.error.InvalidSelectorError(
      `Strategy not supported: ${using}`
    );
@@ -1598,7 +1596,7 @@ GeckoDriver.prototype.findElements = async function(cmd) {

  let startNode;
  if (typeof el != "undefined") {
    startNode = lazy.WebElement.fromUUID(el).toJSON();
    startNode = WebElement.fromUUID(el).toJSON();
  }

  let opts = {
@@ -1637,7 +1635,7 @@ GeckoDriver.prototype.findElements = async function(cmd) {
GeckoDriver.prototype.findElementsFromShadowRoot = async function(cmd) {
  const { shadowRoot, using, value } = cmd.parameters;

  if (!lazy.supportedStrategies.has(using)) {
  if (!SUPPORTED_STRATEGIES.has(using)) {
    throw new lazy.error.InvalidSelectorError(
      `Strategy not supported: ${using}`
    );
@@ -1649,7 +1647,7 @@ GeckoDriver.prototype.findElementsFromShadowRoot = async function(cmd) {

  const opts = {
    all: true,
    startNode: lazy.ShadowRoot.fromUUID(shadowRoot).toJSON(),
    startNode: ShadowRoot.fromUUID(shadowRoot).toJSON(),
    timeout: this.currentSession.timeouts.implicit,
  };

@@ -1690,7 +1688,7 @@ GeckoDriver.prototype.getShadowRoot = async function(cmd) {
    cmd.parameters.id,
    lazy.pprint`Expected "id" to be a string, got ${cmd.parameters.id}`
  );
  let webEl = lazy.WebElement.fromUUID(id).toJSON();
  let webEl = WebElement.fromUUID(id).toJSON();

  return this.getActor().getShadowRoot(webEl);
};
@@ -1743,7 +1741,7 @@ GeckoDriver.prototype.clickElement = async function(cmd) {
  await this._handleUserPrompts();

  let id = lazy.assert.string(cmd.parameters.id);
  let webEl = lazy.WebElement.fromUUID(id).toJSON();
  let webEl = WebElement.fromUUID(id).toJSON();

  const actor = this.getActor();

@@ -1795,7 +1793,7 @@ GeckoDriver.prototype.getElementAttribute = async function(cmd) {

  const id = lazy.assert.string(cmd.parameters.id);
  const name = lazy.assert.string(cmd.parameters.name);
  const webEl = lazy.WebElement.fromUUID(id).toJSON();
  const webEl = WebElement.fromUUID(id).toJSON();

  return this.getActor().getElementAttribute(webEl, name);
};
@@ -1829,7 +1827,7 @@ GeckoDriver.prototype.getElementProperty = async function(cmd) {

  const id = lazy.assert.string(cmd.parameters.id);
  const name = lazy.assert.string(cmd.parameters.name);
  const webEl = lazy.WebElement.fromUUID(id).toJSON();
  const webEl = WebElement.fromUUID(id).toJSON();

  return this.getActor().getElementProperty(webEl, name);
};
@@ -1861,7 +1859,7 @@ GeckoDriver.prototype.getElementText = async function(cmd) {
  await this._handleUserPrompts();

  let id = lazy.assert.string(cmd.parameters.id);
  let webEl = lazy.WebElement.fromUUID(id).toJSON();
  let webEl = WebElement.fromUUID(id).toJSON();

  return this.getActor().getElementText(webEl);
};
@@ -1892,7 +1890,7 @@ GeckoDriver.prototype.getElementTagName = async function(cmd) {
  await this._handleUserPrompts();

  let id = lazy.assert.string(cmd.parameters.id);
  let webEl = lazy.WebElement.fromUUID(id).toJSON();
  let webEl = WebElement.fromUUID(id).toJSON();

  return this.getActor().getElementTagName(webEl);
};
@@ -1921,7 +1919,7 @@ GeckoDriver.prototype.isElementDisplayed = async function(cmd) {
  await this._handleUserPrompts();

  let id = lazy.assert.string(cmd.parameters.id);
  let webEl = lazy.WebElement.fromUUID(id).toJSON();
  let webEl = WebElement.fromUUID(id).toJSON();

  return this.getActor().isElementDisplayed(
    webEl,
@@ -1958,7 +1956,7 @@ GeckoDriver.prototype.getElementValueOfCssProperty = async function(cmd) {

  let id = lazy.assert.string(cmd.parameters.id);
  let prop = lazy.assert.string(cmd.parameters.propertyName);
  let webEl = lazy.WebElement.fromUUID(id).toJSON();
  let webEl = WebElement.fromUUID(id).toJSON();

  return this.getActor().getElementValueOfCssProperty(webEl, prop);
};
@@ -1989,7 +1987,7 @@ GeckoDriver.prototype.isElementEnabled = async function(cmd) {
  await this._handleUserPrompts();

  let id = lazy.assert.string(cmd.parameters.id);
  let webEl = lazy.WebElement.fromUUID(id).toJSON();
  let webEl = WebElement.fromUUID(id).toJSON();

  return this.getActor().isElementEnabled(
    webEl,
@@ -2021,7 +2019,7 @@ GeckoDriver.prototype.isElementSelected = async function(cmd) {
  await this._handleUserPrompts();

  let id = lazy.assert.string(cmd.parameters.id);
  let webEl = lazy.WebElement.fromUUID(id).toJSON();
  let webEl = WebElement.fromUUID(id).toJSON();

  return this.getActor().isElementSelected(
    webEl,
@@ -2046,7 +2044,7 @@ GeckoDriver.prototype.getElementRect = async function(cmd) {
  await this._handleUserPrompts();

  let id = lazy.assert.string(cmd.parameters.id);
  let webEl = lazy.WebElement.fromUUID(id).toJSON();
  let webEl = WebElement.fromUUID(id).toJSON();

  return this.getActor().getElementRect(webEl);
};
@@ -2077,7 +2075,7 @@ GeckoDriver.prototype.sendKeysToElement = async function(cmd) {

  let id = lazy.assert.string(cmd.parameters.id);
  let text = lazy.assert.string(cmd.parameters.text);
  let webEl = lazy.WebElement.fromUUID(id).toJSON();
  let webEl = WebElement.fromUUID(id).toJSON();

  return this.getActor().sendKeysToElement(
    webEl,
@@ -2109,7 +2107,7 @@ GeckoDriver.prototype.clearElement = async function(cmd) {
  await this._handleUserPrompts();

  let id = lazy.assert.string(cmd.parameters.id);
  let webEl = lazy.WebElement.fromUUID(id).toJSON();
  let webEl = WebElement.fromUUID(id).toJSON();

  await this.getActor().clearElement(webEl);
};
@@ -2465,7 +2463,7 @@ GeckoDriver.prototype.takeScreenshot = async function(cmd) {
  full = typeof full == "undefined" ? true : full;
  scroll = typeof scroll == "undefined" ? true : scroll;

  let webEl = id ? lazy.WebElement.fromUUID(id).toJSON() : null;
  let webEl = id ? WebElement.fromUUID(id).toJSON() : null;

  // Only consider full screenshot if no element has been specified
  full = webEl ? false : full;
@@ -3262,7 +3260,7 @@ GeckoDriver.prototype.getComputedLabel = async function(cmd) {
  await this._handleUserPrompts();

  let id = lazy.assert.string(cmd.parameters.id);
  let webEl = lazy.WebElement.fromUUID(id).toJSON();
  let webEl = WebElement.fromUUID(id).toJSON();

  return this.getActor().getComputedLabel(webEl);
};
@@ -3283,7 +3281,7 @@ GeckoDriver.prototype.getComputedRole = async function(cmd) {
  await this._handleUserPrompts();

  let id = lazy.assert.string(cmd.parameters.id);
  let webEl = lazy.WebElement.fromUUID(id).toJSON();
  let webEl = WebElement.fromUUID(id).toJSON();
  return this.getActor().getComputedRole(webEl);
};

+415 −0

File changed and moved.

Preview size limit exceeded, changes collapsed.

Loading