[Webkit-unassigned] [Bug 61295] New: Web Inspector: Applescript "do JavaScript" fails to return same results as javascript console

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon May 23 11:40:09 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=61295

           Summary: Web Inspector: Applescript "do JavaScript" fails to
                    return same results as javascript console
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Macintosh
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: WebCore JavaScript
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: bt at ericoberle.com
                CC: timothy at apple.com, rik at webkit.org, keishi at webkit.org,
                    pmuellr at yahoo.com, joepeck at webkit.org,
                    pfeldman at chromium.org, yurys at chromium.org,
                    bweinstein at apple.com, apavlov at chromium.org,
                    loislo at chromium.org


I am not sure I am filing this under the right component category, but basically I am hoping that a fix could be made to allow Applescript's "do Javascript" command to obtain all a text/string dump of everything that appears in the debugger's javascript console. 

For example:

If I type in the Javascript console: 

document.images

I receive a list of all image tags in the document

But if I issue this Applescript command:

tell application "WebKit"
    set the_tab to current tab of window 1
    set x to do JavaScript "document.images" in the_tab
    log x
end tell

I receive only: 
"[object HTMLDivElement]"

as a result.  Trying to push the array into a Javascript array and converting it to a string inside the Javascript passed to Applescript is equally futile.  

I understand that no one is going to implement the DOM datatypes for Applescript.  But if the console can display the image tags as a block of text, why not let Applescript's "do Javascript" do the same?   This would be huge for me trying to automate some webpage testing. 

Thank you for your consideration.

best,

Eric Oberle

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list