Getting the content of the Browser [message #463152] |
Fri, 28 October 2005 02:56  |
Eclipse User |
|
|
|
Hi all,
sorry I write again in few days for similar questions.
I was wondering how do I get the content of what is displayed by the
Browser component. It seems to me APIs are missing and that I should do
some sort of tricky hack via javascript, by means of
browser.execute(" window.status=window_document_content_as_string_in_some_way( ) ").
Thanks in advance,
Alessio Pace.
|
|
|
|
Re: Getting the content of the Browser [message #463235 is a reply to message #463192] |
Wed, 02 November 2005 02:23  |
Eclipse User |
|
|
|
Those alternatives work, but I fear that innerHTML is not w3c standard
but just something introduced into browsers for convenience.
I read the getText() proposal: I can't understand if it will be the text
of the rendered page or of the source page? For instance, if I open an
HTML document with 2 frames, will I get the string representation of
what I actually "see" rendered inside the browser component or the
string representation of the source document?
Toshihiro wrote:
> Sorry if I misunderstood.
> As for HTML, see Bug #107142
> (https://bugs.eclipse.org/bugs/show_bug.cgi?id=107142)
> As for Text, see Bug #75815
> (https://bugs.eclipse.org/bugs/show_bug.cgi?id=75815)
>
> - IE only -
> Try browser.execute("alert(document.body.innerHTML)");
> and browser.execute("window.status=document.body.innerHTML");
> Changing status wont work, maybe.
> Another one,
> browser.execute("clipboardData.setData('Text',
> document.body.innerHTML)");
> This will work.
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.24382 seconds