Bug 156635 - Web Automation: provide detailed error messages when an automation command fails
Summary: Web Automation: provide detailed error messages when an automation command fails
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: BJ Burg
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-04-15 12:27 PDT by BJ Burg
Modified: 2016-04-18 10:45 PDT (History)
7 users (show)

See Also:


Attachments
Proposed Fix (37.56 KB, patch)
2016-04-15 17:09 PDT, BJ Burg
darin: review+
bburg: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description BJ Burg 2016-04-15 12:27:42 PDT
.
Comment 1 Radar WebKit Bug Importer 2016-04-15 12:28:03 PDT
<rdar://problem/25754051>
Comment 2 BJ Burg 2016-04-15 17:09:56 PDT
Created attachment 276527 [details]
Proposed Fix
Comment 3 BJ Burg 2016-04-15 17:10:17 PDT
Comment on attachment 276527 [details]
Proposed Fix

Needs to land with corresponding internal patch.
Comment 4 Timothy Hatcher 2016-04-18 07:37:25 PDT
Comment on attachment 276527 [details]
Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=276527&action=review

> Source/WebKit2/UIProcess/Automation/WebAutomationSession.cpp:269
> +        FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(InternalError, "The remote session could not request a new browsing context.");

If we are passing these error messages through to the endpoints, should we use "window" instead of "browsing context"?

> Source/WebKit2/UIProcess/Automation/WebAutomationSession.cpp:273
> +        FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(InternalError, "The remote session failed to create a new browsing context.");

Ditto.
Comment 5 BJ Burg 2016-04-18 10:15:58 PDT
Comment on attachment 276527 [details]
Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=276527&action=review

>> Source/WebKit2/UIProcess/Automation/WebAutomationSession.cpp:269
>> +        FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(InternalError, "The remote session could not request a new browsing context.");
> 
> If we are passing these error messages through to the endpoints, should we use "window" instead of "browsing context"?

They currently only go through to endpoints in engineering builds, since most of these errors are programming errors and leak implementation details. So the verbiage is not important IMO.
Comment 6 Timothy Hatcher 2016-04-18 10:40:04 PDT
Comment on attachment 276527 [details]
Proposed Fix

View in context: https://bugs.webkit.org/attachment.cgi?id=276527&action=review

>>> Source/WebKit2/UIProcess/Automation/WebAutomationSession.cpp:269
>>> +        FAIL_WITH_PREDEFINED_ERROR_AND_DETAILS(InternalError, "The remote session could not request a new browsing context.");
>> 
>> If we are passing these error messages through to the endpoints, should we use "window" instead of "browsing context"?
> 
> They currently only go through to endpoints in engineering builds, since most of these errors are programming errors and leak implementation details. So the verbiage is not important IMO.

Okay!
Comment 7 BJ Burg 2016-04-18 10:45:45 PDT
Committed r199680: <http://trac.webkit.org/changeset/199680>