<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>24364</bug_id>
          
          <creation_ts>2014-01-22 17:02:50 +0000</creation_ts>
          <short_desc>Define what the capture area is on takeScreenshot</short_desc>
          <delta_ts>2014-09-07 12:03:43 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Browser Test/Tools WG</product>
          <component>WebDriver</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>20860</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Andreas Tolfsen">ato</reporter>
          <assigned_to name="David Burns :automatedtester">dburns</assigned_to>
          <cc>botalov.andrey</cc>
    
    <cc>dburns</cc>
    
    <cc>mike</cc>
    
    <cc>simon.m.stewart</cc>
          
          <qa_contact name="Browser Testing and Tools WG">public-browser-tools-testing</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>98898</commentid>
    <comment_count>0</comment_count>
    <who name="Andreas Tolfsen">ato</who>
    <bug_when>2014-01-22 17:02:50 +0000</bug_when>
    <thetext>The wording of the takeScreenshot command isn&apos;t great, and it currently doesn&apos;t define which area of the screen to capture when not given an explicit web element reference.

Selenium uses a prioritized list of preferred things to capture:

    http://selenium.googlecode.com/git/docs/api/java/org/openqa/selenium/TakesScreenshot.html

This isn&apos;t great and we should mandate something the browsers should do, which can be one of the following I guess:

  - Browser window including chrome
  - Visible viewport
  - Canvas of bounding box of the document of the top-level browsing context</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98899</commentid>
    <comment_count>1</comment_count>
    <who name="Andreas Tolfsen">ato</who>
    <bug_when>2014-01-22 17:03:24 +0000</bug_when>
    <thetext>An interesting question, I find, is whether the last point can be replaced by doing (pseudo code) driver.find_element_by_css(&quot;:root&quot;).take_screenshot(), which would send the web element reference ID of &quot;:root&quot; as an argument to takeScreenshot.

If we&apos;re happy with that we could have takeScreenshot without arguments just do the visible viewport or the browser window.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108518</commentid>
    <comment_count>2</comment_count>
    <who name="David Burns :automatedtester">dburns</who>
    <bug_when>2014-06-30 22:07:06 +0000</bug_when>
    <thetext>*** Bug 25692 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>108631</commentid>
    <comment_count>3</comment_count>
    <who name="David Burns :automatedtester">dburns</who>
    <bug_when>2014-07-01 21:57:53 +0000</bug_when>
    <thetext>Initial implementation in https://dvcs.w3.org/hg/webdriver/rev/e4451afd6d71</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>111138</commentid>
    <comment_count>4</comment_count>
    <who name="David Burns :automatedtester">dburns</who>
    <bug_when>2014-09-07 12:03:43 +0000</bug_when>
    <thetext>Seeing as no comments have been added (and I am sure there are other errors so raise a new bug for those) I am closing this bug</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>