Bug 190221 - Web Automation: tab default key handler should always cycle focus when page is controlled by automation
Summary: Web Automation: tab default key handler should always cycle focus when page i...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: UI Events (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: BJ Burg
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-10-02 15:20 PDT by BJ Burg
Modified: 2018-10-02 16:55 PDT (History)
7 users (show)

See Also:


Attachments
Patch (1.91 KB, patch)
2018-10-02 15:26 PDT, BJ Burg
joepeck: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description BJ Burg 2018-10-02 15:20:52 PDT
.
Comment 1 BJ Burg 2018-10-02 15:21:04 PDT
<rdar://problem/44914534>
Comment 2 BJ Burg 2018-10-02 15:26:09 PDT
Created attachment 351445 [details]
Patch
Comment 3 Joseph Pecoraro 2018-10-02 15:38:52 PDT
Comment on attachment 351445 [details]
Patch

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

r=me

> Source/WebCore/ChangeLog:15
> +        Always cycle focus if the page is controlled by automation. If the chrome takes
> +        focus, then the first responder will be something other than the WebView, which
> +        causes subsequent WebDriver commands to hang.

Hmm, this is interesting and makes sense but doesn't that mean that the test might differ from a real user behavior on the page?
Comment 4 BJ Burg 2018-10-02 15:50:30 PDT
(In reply to Joseph Pecoraro from comment #3)
> Comment on attachment 351445 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=351445&action=review
> 
> r=me
> 
> > Source/WebCore/ChangeLog:15
> > +        Always cycle focus if the page is controlled by automation. If the chrome takes
> > +        focus, then the first responder will be something other than the WebView, which
> > +        causes subsequent WebDriver commands to hang.
> 
> Hmm, this is interesting and makes sense but doesn't that mean that the test
> might differ from a real user behavior on the page?

Yes, it does, though I don't know that wraparound is in anyway specified by a standard.

There are many other differences between WebDriver and normal UA behavior, the largest being how alerts are handled.
Comment 5 BJ Burg 2018-10-02 16:55:47 PDT
Committed r236774: <https://trac.webkit.org/changeset/236774>