diff --git a/index.html b/index.html index a607412f5..aeb3cdf53 100644 --- a/index.html +++ b/index.html @@ -1010,6 +1010,12 @@

Endpoints

Take Screenshot + + GET + /session/{session id}/screenshot/full + Take Full Screenshot + + GET /session/{session id}/element/{element id}/screenshot @@ -9032,6 +9038,8 @@

Screen capture

WebDriver provides the Take Screenshot command to capture the top-level browsing context’s initial viewport, + and the Take Full Screenshot command + to capture the scrollable region of the top-level browsing context’s scrolling element, and a command Take Element Screenshot for doing the same with the visible region of an element’s bounding rectangle after it has been scrolled into view. @@ -9082,6 +9090,45 @@

Screen capture

  • Return success with canvas. +

    In order to draw a scrollable region from the framebuffer, + given a scrolling element: + +

      +
    1. If either the initial viewport’s width or height + is 0 CSS pixels, + return error with error code unable to capture screen. + +

    2. Let canvas be a new canvas element, + and set its width + and height + to scrolling element scrollWidth and scrollHeight, respectively. + +

    3. Let context, a canvas context mode, + be the result of invoking the 2D context creation algorithm + given canvas as the target. + +

    4. Complete implementation specific steps equivalent to + drawing the region of the framebuffer + specified by the following coordinates onto context: + +

      +
      X coordinate +
      0 + +
      Y coordinate +
      0 + +
      Width +
      scrolling element scrollWidth + +
      Height +
      scrolling element scrollHeight +
      + +
    5. Return success with canvas. +

    + +

    To encode a canvas as Base64 a canvas element: @@ -9152,6 +9199,47 @@

    Take Screenshot

    +
    +

    Take Full Screenshot

    + + + + + + + + + + +
    HTTP MethodURI Template
    GET/session/{session id}/screenshot/full
    + +

    The remote end steps are: + +

      +
    1. If the current top-level browsing context is no longer open, + return error with error code no such window. + +

    2. When the user agent is next to run the animation frame callbacks: +

        + +
      1. Let screenshot result be the result of trying to call + draw a scrollable region from the framebuffer, + given scrolling element as an argument. + +

      2. Let canvas be a canvas element + of screenshot result’s data. + +

      3. Let encoding result be the result of trying + encoding a canvas as Base64 canvas. + +

      4. Let encoded string be encoding result’s data. +

      + +
    3. Return success with data encoded string. +

    + +
    +

    Take Element Screenshot

    @@ -10111,6 +10199,15 @@

    Index

    sometimes here referred to as the viewport. +
    The following terms are defined in + the CSSOM View Module: [[CSSOM-VIEW]] + +
    The following properties are defined in the CSS Display Module Level 3 specification: [[CSS3-DISPLAY]]