[Bug 29530] New: Proposal for Get Element Text

https://www.w3.org/Bugs/Public/show_bug.cgi?id=29530

            Bug ID: 29530
           Summary: Proposal for Get Element Text
           Product: Browser Test/Tools WG
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: WebDriver
          Assignee: public-browser-tools-testing@w3.org
          Reporter: clmartin@microsoft.com
        QA Contact: public-browser-tools-testing@w3.org
                CC: mike@w3.org
            Blocks: 20860
  Target Milestone: ---

"12.5 getElementText()"

John Jansen and I were reading the specification for getElementText() and he
remembers discussing it at a face to face but can't find the minutes. Below is
what we think was agreed upon:

Get Element Text

GET /session/{session id}/element/{element id}/text

The Get Element Text command retrieves the textContent value of the given web
element.

1. If the current top-level browsing context is no longer open, return error
with error code no such window.
2. Handle any user prompts and return its value if it is an error.
3. Let element result be the result of getting a known element by UUID
parameter element id.
4. If element result is a success, let element be element result's data.
Otherwise, return element result.
5. If element is stale, return error with error code stale element reference.
6. Let element text be the result of calling <a
href="https://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#Node3-textContent">textContent</a>
on the specified element.
7. Let body be a JSON Object with the "value" memeber set to the element text.
8. Return success with data body.

What do you think?


Referenced Bugs:

https://www.w3.org/Bugs/Public/show_bug.cgi?id=20860
[Bug 20860] WebDriver Level 1
-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Monday, 14 March 2016 17:20:33 UTC