Bug 156635

Summary: Web Automation: provide detailed error messages when an automation command fails
Product: WebKit Reporter: BJ Burg <bburg>
Component: Web InspectorAssignee: BJ Burg <bburg>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, graouts, joepeck, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Proposed Fix darin: review+, bburg: commit-queue-

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>