getPageSource may be more suitable than getScreenshotAs for returning the DOM dump. http://codereview.appspot.com/1207042/diff/1/4 File driver/src/java/org/openqa/selenium/webkit/WebKitDriver.java ...
13 years, 11 months ago
(2010-05-17 09:34:55 UTC)
#3
getPageSource may be more suitable than getScreenshotAs for returning the DOM
dump.
http://codereview.appspot.com/1207042/diff/1/4
File driver/src/java/org/openqa/selenium/webkit/WebKitDriver.java (right):
http://codereview.appspot.com/1207042/diff/1/4#newcode829
driver/src/java/org/openqa/selenium/webkit/WebKitDriver.java:829:
Looks like getPageSource is more suitable for getting the DOM dump than
getScreenshot.
That's good point. Vadzim, do you think we can move screen dump generation to getPageSource ...
13 years, 11 months ago
(2010-05-17 09:50:50 UTC)
#4
That's good point.
Vadzim, do you think we can move screen dump generation to getPageSource
instead?
- Baran
On 17 May 2010 10:34, <eranm@google.com> wrote:
> getPageSource may be more suitable than getScreenshotAs for returning
> the DOM dump.
>
>
> http://codereview.appspot.com/1207042/diff/1/4
> File driver/src/java/org/openqa/selenium/webkit/WebKitDriver.java
> (right):
>
> http://codereview.appspot.com/1207042/diff/1/4#newcode829
> driver/src/java/org/openqa/selenium/webkit/WebKitDriver.java:829:
> Looks like getPageSource is more suitable for getting the DOM dump than
> getScreenshot.
>
>
> http://codereview.appspot.com/1207042/show
>
As far as I understand getPageSource is already implemented. I thought that idea was to ...
13 years, 11 months ago
(2010-05-17 10:13:39 UTC)
#5
As far as I understand getPageSource is already implemented.
I thought that idea was to return DOM as image. correct?
On Mon, May 17, 2010 at 10:50 AM, Baran ♪ <baran@google.com> wrote:
> That's good point.
>
> Vadzim, do you think we can move screen dump generation to getPageSource
> instead?
>
> - Baran
>
>
> On 17 May 2010 10:34, <eranm@google.com> wrote:
>
>> getPageSource may be more suitable than getScreenshotAs for returning
>> the DOM dump.
>>
>>
>> http://codereview.appspot.com/1207042/diff/1/4
>> File driver/src/java/org/openqa/selenium/webkit/WebKitDriver.java
>> (right):
>>
>> http://codereview.appspot.com/1207042/diff/1/4#newcode829
>> driver/src/java/org/openqa/selenium/webkit/WebKitDriver.java:829:
>> Looks like getPageSource is more suitable for getting the DOM dump than
>> getScreenshot.
>>
>>
>> http://codereview.appspot.com/1207042/show
>>
>
>
--
-------
Anatoli
Another idea: can draw rectangle according to it coordinate and add debug/help info? It can ...
13 years, 11 months ago
(2010-05-17 10:14:55 UTC)
#6
Another idea: can draw rectangle according to it coordinate and add
debug/help info?
It can be very useful
On Mon, May 17, 2010 at 11:13 AM, Anatoli Kuzmin <kuzmin@google.com> wrote:
> As far as I understand getPageSource is already implemented.
> I thought that idea was to return DOM as image. correct?
>
>
> On Mon, May 17, 2010 at 10:50 AM, Baran ♪ <baran@google.com> wrote:
>
>> That's good point.
>>
>> Vadzim, do you think we can move screen dump generation to getPageSource
>> instead?
>>
>> - Baran
>>
>>
>> On 17 May 2010 10:34, <eranm@google.com> wrote:
>>
>>> getPageSource may be more suitable than getScreenshotAs for returning
>>> the DOM dump.
>>>
>>>
>>> http://codereview.appspot.com/1207042/diff/1/4
>>> File driver/src/java/org/openqa/selenium/webkit/WebKitDriver.java
>>> (right):
>>>
>>> http://codereview.appspot.com/1207042/diff/1/4#newcode829
>>> driver/src/java/org/openqa/selenium/webkit/WebKitDriver.java:829:
>>> Looks like getPageSource is more suitable for getting the DOM dump than
>>> getScreenshot.
>>>
>>>
>>> http://codereview.appspot.com/1207042/show
>>>
>>
>>
>
>
> --
> -------
> Anatoli
>
>
--
-------
Anatoli
Yes, getPageSource is already implemented so we can't change it (as it behaves according to ...
13 years, 11 months ago
(2010-05-17 10:39:05 UTC)
#7
Yes, getPageSource is already implemented so we can't change it (as it
behaves according to WebDriver expectations). But in fact they behave in a
very similar way, difference is being innerHTML versus outerHTML.
I don't think the idea was to return JNI as an image (say png file)
On Mon, May 17, 2010 at 1:14 PM, Anatoli Kuzmin <kuzmin@google.com> wrote:
> Another idea: can draw rectangle according to it coordinate and add
> debug/help info?
> It can be very useful
>
>
> On Mon, May 17, 2010 at 11:13 AM, Anatoli Kuzmin <kuzmin@google.com>wrote:
>
>> As far as I understand getPageSource is already implemented.
>> I thought that idea was to return DOM as image. correct?
>>
>>
>> On Mon, May 17, 2010 at 10:50 AM, Baran ♪ <baran@google.com> wrote:
>>
>>> That's good point.
>>>
>>> Vadzim, do you think we can move screen dump generation to getPageSource
>>> instead?
>>>
>>> - Baran
>>>
>>>
>>> On 17 May 2010 10:34, <eranm@google.com> wrote:
>>>
>>>> getPageSource may be more suitable than getScreenshotAs for returning
>>>> the DOM dump.
>>>>
>>>>
>>>> http://codereview.appspot.com/1207042/diff/1/4
>>>> File driver/src/java/org/openqa/selenium/webkit/WebKitDriver.java
>>>> (right):
>>>>
>>>> http://codereview.appspot.com/1207042/diff/1/4#newcode829
>>>> driver/src/java/org/openqa/selenium/webkit/WebKitDriver.java:829:
>>>> Looks like getPageSource is more suitable for getting the DOM dump than
>>>> getScreenshot.
>>>>
>>>>
>>>> http://codereview.appspot.com/1207042/show
>>>>
>>>
>>>
>>
>>
>> --
>> -------
>> Anatoli
>>
>>
>
>
> --
> -------
> Anatoli
>
>
Thanks Vadzim. Then in this case the getScreenshot implementation becomes redundant. Returning an image is ...
13 years, 11 months ago
(2010-05-17 10:43:57 UTC)
#8
Thanks Vadzim. Then in this case the getScreenshot implementation becomes
redundant.
Returning an image is a good idea, though this is not high priority right
now. Also, i imagine it'd need a simple graphics library for drawing. I'd
prefer to leave implementation of a visualizer until it's actually needed.
- Baran
On 17 May 2010 11:39, Vadzim Razmyslovich <razmyslovich@google.com> wrote:
> Yes, getPageSource is already implemented so we can't change it (as it
> behaves according to WebDriver expectations). But in fact they behave in a
> very similar way, difference is being innerHTML versus outerHTML.
>
> I don't think the idea was to return JNI as an image (say png file)
>
> On Mon, May 17, 2010 at 1:14 PM, Anatoli Kuzmin <kuzmin@google.com> wrote:
>
>> Another idea: can draw rectangle according to it coordinate and add
>> debug/help info?
>> It can be very useful
>>
>>
>> On Mon, May 17, 2010 at 11:13 AM, Anatoli Kuzmin <kuzmin@google.com>wrote:
>>
>>> As far as I understand getPageSource is already implemented.
>>> I thought that idea was to return DOM as image. correct?
>>>
>>>
>>> On Mon, May 17, 2010 at 10:50 AM, Baran ♪ <baran@google.com> wrote:
>>>
>>>> That's good point.
>>>>
>>>> Vadzim, do you think we can move screen dump generation to getPageSource
>>>> instead?
>>>>
>>>> - Baran
>>>>
>>>>
>>>> On 17 May 2010 10:34, <eranm@google.com> wrote:
>>>>
>>>>> getPageSource may be more suitable than getScreenshotAs for returning
>>>>> the DOM dump.
>>>>>
>>>>>
>>>>> http://codereview.appspot.com/1207042/diff/1/4
>>>>> File driver/src/java/org/openqa/selenium/webkit/WebKitDriver.java
>>>>> (right):
>>>>>
>>>>> http://codereview.appspot.com/1207042/diff/1/4#newcode829
>>>>> driver/src/java/org/openqa/selenium/webkit/WebKitDriver.java:829:
>>>>> Looks like getPageSource is more suitable for getting the DOM dump than
>>>>> getScreenshot.
>>>>>
>>>>>
>>>>> http://codereview.appspot.com/1207042/show
>>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> -------
>>> Anatoli
>>>
>>>
>>
>>
>> --
>> -------
>> Anatoli
>>
>>
>
Why use JNI for this when you could just cast the driver instance to a ...
13 years, 11 months ago
(2010-05-17 10:52:41 UTC)
#9
Why use JNI for this when you could just cast the driver instance to a
JavascriptExecutor and use the "innerHTML" or "outerHTML" properties?
The less complexity in the code, the better.
Returning a PNG is only necessary if you implement the TakesScreenshot
interface.
Simon
On Mon, May 17, 2010 at 11:39 AM, Vadzim Razmyslovich
<razmyslovich@google.com> wrote:
> Yes, getPageSource is already implemented so we can't change it (as it
> behaves according to WebDriver expectations). But in fact they behave in a
> very similar way, difference is being innerHTML versus outerHTML.
> I don't think the idea was to return JNI as an image (say png file)
> On Mon, May 17, 2010 at 1:14 PM, Anatoli Kuzmin <kuzmin@google.com> wrote:
>>
>> Another idea: can draw rectangle according to it coordinate and add
>> debug/help info?
>> It can be very useful
>>
>> On Mon, May 17, 2010 at 11:13 AM, Anatoli Kuzmin <kuzmin@google.com>
>> wrote:
>>>
>>> As far as I understand getPageSource is already implemented.
>>> I thought that idea was to return DOM as image. correct?
>>>
>>> On Mon, May 17, 2010 at 10:50 AM, Baran ♪ <baran@google.com> wrote:
>>>>
>>>> That's good point.
>>>> Vadzim, do you think we can move screen dump generation to getPageSource
>>>> instead?
>>>>
>>>> - Baran
>>>>
>>>> On 17 May 2010 10:34, <eranm@google.com> wrote:
>>>>>
>>>>> getPageSource may be more suitable than getScreenshotAs for returning
>>>>> the DOM dump.
>>>>>
>>>>>
>>>>> http://codereview.appspot.com/1207042/diff/1/4
>>>>> File driver/src/java/org/openqa/selenium/webkit/WebKitDriver.java
>>>>> (right):
>>>>>
>>>>> http://codereview.appspot.com/1207042/diff/1/4#newcode829
>>>>> driver/src/java/org/openqa/selenium/webkit/WebKitDriver.java:829:
>>>>> Looks like getPageSource is more suitable for getting the DOM dump than
>>>>> getScreenshot.
>>>>>
>>>>> http://codereview.appspot.com/1207042/show
>>>>
>>>
>>>
>>>
>>> --
>>> -------
>>> Anatoli
>>
>>
>>
>> --
>> -------
>> Anatoli
>
>
Issue 1207042: DOM objects dump
Created 13 years, 11 months ago by razmyslovich
Modified 13 years, 11 months ago
Reviewers: viarheichyk, baran, sauta, Eran
Base URL: http://webkitdriver.googlecode.com/svn/trunk/
Comments: 1