RESOLVED FIXED 159777
Web Automation: FrameNotFound errors happen a lot for the main frame
https://bugs.webkit.org/show_bug.cgi?id=159777
Summary Web Automation: FrameNotFound errors happen a lot for the main frame
Timothy Hatcher
Reported 2016-07-14 12:43:49 PDT
WebAutomationSession::webFrameProxyForHandle is returning nullptr for empty handles (main frame), when we need a frame. That causes the FrameNotFound error. This is a race between a page being created and the main frame being created. WebPage sends a DidCreateMainFrame message, until that is sent we don’t have a frameID for the main frame and we can’t send our evaluateJavaScript message (or other messages with just frameID). We need to send both pageID and frameID, and have the WebProcess side resolve the mainFrame from 0 based on the known pageID. <rdar://problem/27224628>
Attachments
Patch (31.03 KB, patch)
2016-07-14 12:46 PDT, Timothy Hatcher
no flags
Timothy Hatcher
Comment 1 2016-07-14 12:46:04 PDT
Blaze Burg
Comment 2 2016-07-14 14:32:31 PDT
Comment on attachment 283668 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=283668&action=review r=me > Source/WebKit2/UIProcess/Automation/WebAutomationSession.cpp:766 > + // Always send the main frame ID as 0 so it is resolved on the WebProcess side. This avoids a race when page->mainFrame() is null still. Nit: 'still null'
WebKit Commit Bot
Comment 3 2016-07-14 14:53:41 PDT
Comment on attachment 283668 [details] Patch Clearing flags on attachment: 283668 Committed r203245: <http://trac.webkit.org/changeset/203245>
WebKit Commit Bot
Comment 4 2016-07-14 14:53:46 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.