[prev in list] [next in list] [prev in thread] [next in thread] 

List:       htmlunit-user
Subject:    Re: [Htmlunit-user] Question on getCurrentWindow
From:       prashant shanti kumar <prashant_hyd () yahoo ! com>
Date:       2009-08-19 19:47:16
Message-ID: 727421.4934.qm () web53707 ! mail ! re2 ! yahoo ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi Daniel,
       I actually like the idea of using the WebWindowsListener interface albeit more \
coding on my side :)

The tool I am working on is unfortunately internal dev for the time being. It is \
kinda similar to JWebUnit but perhaps little more custom. We have had great success \
with HtmlUnit for the past year and a half (baring the occasional hiccup like above).

Thanks again for taking time to reply.

- Prashant

--- On Tue, 8/18/09, Daniel Gredler <djgredler@gmail.com> wrote:

From: Daniel Gredler <djgredler@gmail.com>
Subject: Re: [Htmlunit-user] Question on getCurrentWindow
To: htmlunit-user@lists.sourceforge.net
Date: Tuesday, August 18, 2009, 1:00 PM

Hi Prashant,

That's one possibility. Another is to keep track of the "current window" yourself \
based on your own logic -- maybe ignore popups or something. You can implement your \
own WebWindowListener and register it with the WebClient instance for this purpose.


BTW, what UI tool are you working on? Is it public or internal development?

Take care,

Daniel



On Tue, Aug 18, 2009 at 12:29 PM, prashant shanti kumar <prashant_hyd@yahoo.com> \
wrote:


Hi Daniel,
       Thanks for the reply. I do not have a handle on the page/page name/order of \
content changes. A little background, the tool I am developing is application \
agnostic and runs automated tests that users build using my tool's UI. Given that, I \
am wondering if a utility that can locate an element across all open pages might be \
handy? Maybe have it return a Map of pages to element reference? Anything you guys \
can think of that might work against me?


Thanks again,
- Prashant

--- On Tue, 8/18/09, Daniel Gredler <djgredler@gmail.com> wrote:


From: Daniel Gredler <djgredler@gmail.com>
Subject: Re: [Htmlunit-user] Question on getCurrentWindow
To:
 htmlunit-user@lists.sourceforge.net
Date: Tuesday, August 18, 2009, 12:26 AM

Hi Prashant,

The logic which determines the current window relies on the ordering of window \
openings and content changes, so if this order is non-deterministic then you won't be \
able to rely on the current window always being the same. I'd suggest that you \
manually keep track of the page or window in which you are interested.



Take care,

Daniel


On Mon, Aug 17, 2009 at 3:31 PM, prashant shanti kumar <prashant_hyd@yahoo.com> \
wrote:




Hello,
   I have a question about WebClient.getCurrentWindow. Supposing my test site opens a \
popup and refreshes the parent page, how does getCurrentWindow know which one is the \
current window to return the getPage() ? 



The behavior I have seen is if the main window takes a little while longer than the \
popup, it's marked as "current" but if the popup takes longer, it's marked "current". \
Is this expected behavior? Is there a consistent way to predict what the Top window \
will be?



Thanks for any feedback

- Prashant





      
------------------------------------------------------------------------------

Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day

trial. Simplify your report design, integration and deployment - and focus on

what you do best, core application coding. Discover what's new with

Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________

Htmlunit-user mailing list

Htmlunit-user@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/htmlunit-user





-- 
Daniel Gredler
http://daniel.gredler.net/


-----Inline Attachment Follows-----

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 

trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

-----Inline Attachment Follows-----

_______________________________________________
Htmlunit-user mailing list
Htmlunit-user@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/htmlunit-user





      
------------------------------------------------------------------------------

Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day

trial. Simplify your report design, integration and deployment - and focus on

what you do best, core application coding. Discover what's new with

Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________

Htmlunit-user mailing list

Htmlunit-user@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/htmlunit-user





-- 
Daniel Gredler
http://daniel.gredler.net/


-----Inline Attachment Follows-----

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
-----Inline Attachment Follows-----

_______________________________________________
Htmlunit-user mailing list
Htmlunit-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/htmlunit-user



      


[Attachment #5 (text/html)]

<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: \
inherit;">Hi Daniel,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I actually like the idea \
of using the WebWindowsListener interface albeit more coding on my side :)<br><br>The \
tool I am working on is unfortunately internal dev for the time being. It is kinda \
similar to JWebUnit but perhaps little more custom. We have had great success with \
HtmlUnit for the past year and a half (baring the occasional hiccup like \
above).<br><br>Thanks again for taking time to reply.<br><br>- Prashant<br><br>--- On \
<b>Tue, 8/18/09, Daniel Gredler <i>&lt;djgredler@gmail.com&gt;</i></b> \
wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: \
5px; padding-left: 5px;"><br>From: Daniel Gredler \
&lt;djgredler@gmail.com&gt;<br>Subject: Re: [Htmlunit-user] Question on \
getCurrentWindow<br>To: htmlunit-user@lists.sourceforge.net<br>Date: Tuesday, August \
18, 2009, 1:00  PM<br><br><div id="yiv3352172">Hi Prashant,<br><br>That's one \
possibility. Another is to keep track of the "current window" yourself based on your \
own logic -- maybe ignore popups or something. You can implement your own \
WebWindowListener and register it with the WebClient instance for this purpose.<br> \
<br>BTW, what UI tool are you working on? Is it public or internal \
development?<br><br>Take care,<br><br>Daniel<br><br><br><br><div \
class="gmail_quote">On Tue, Aug 18, 2009 at 12:29 PM, prashant shanti kumar <span \
dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:prashant_hyd@yahoo.com" \
target="_blank" href="/mc/compose?to=prashant_hyd@yahoo.com">prashant_hyd@yahoo.com</a>&gt;</span> \
wrote:<br> <blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, \
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><table border="0" \
cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; \
font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; \
line-height: inherit; font-size-adjust: inherit; font-stretch: inherit;" \
valign="top"> Hi Daniel,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Thanks for the \
reply. I do not have a handle on the page/page name/order of content changes. A \
little background, the tool I am developing is application agnostic and runs \
automated tests that users build using my tool's UI. Given that, I am wondering if a \
utility that can locate an element across all open pages might be handy? Maybe have \
it return a Map of pages to element reference? Anything you guys can think of that \
might work against me?<br> <br>Thanks again,<br>- Prashant<br><br>--- On <b>Tue, \
8/18/09, Daniel Gredler <i>&lt;<a rel="nofollow" ymailto="mailto:djgredler@gmail.com" \
target="_blank" href="/mc/compose?to=djgredler@gmail.com">djgredler@gmail.com</a>&gt;</i></b> \
wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: \
5px; padding-left: 5px;"> <br>From: Daniel Gredler &lt;<a rel="nofollow" \
ymailto="mailto:djgredler@gmail.com" target="_blank" \
href="/mc/compose?to=djgredler@gmail.com">djgredler@gmail.com</a>&gt;<br>Subject: Re: \
[Htmlunit-user] Question on getCurrentWindow<br>To:  <a rel="nofollow" \
ymailto="mailto:htmlunit-user@lists.sourceforge.net" target="_blank" \
href="/mc/compose?to=htmlunit-user@lists.sourceforge.net">htmlunit-user@lists.sourceforge.net</a><br>Date: \
Tuesday, August 18, 2009, 12:26 AM<div><div></div><div class="h5"><br><br><div>Hi \
Prashant,<br><br>The logic which determines the current window relies on the ordering \
of window openings and content changes, so if this order is non-deterministic then \
you won't be able to rely on the current window always being the same. I'd suggest \
that you manually keep track of the page or window in which you are interested.<br>

<br>Take care,<br><br>Daniel<br><br><br><div class="gmail_quote">On Mon, Aug 17, 2009 \
at 3:31 PM, prashant shanti kumar <span dir="ltr">&lt;<a rel="nofollow" \
target="_blank" href="http://mc/compose?to=prashant_hyd@yahoo.com">prashant_hyd@yahoo.com</a>&gt;</span> \
wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); \
margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><table border="0" cellpadding="0" \
cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; \
font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: \
inherit; font-size-adjust: inherit; font-stretch: inherit;" valign="top">

Hello,<br>&nbsp;&nbsp; I have a question about WebClient.getCurrentWindow. Supposing \
my test site opens a&nbsp; popup and refreshes the parent page, how does \
getCurrentWindow know which one is the current window to return the getPage() ? <br>

<br>The behavior I have seen is if the main window takes a little while longer than \
the popup, it's marked as "current" but if the popup takes longer, it's marked \
"current". Is this expected behavior? Is there a consistent way to predict what the \
Top window will be?<br>

<br>Thanks for any feedback<br><br>- Prashant<br></td></tr></tbody></table><br>



      <br>------------------------------------------------------------------------------<br>
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day<br>
trial. Simplify your report design, integration and deployment - and focus on<br>
what you do best, core application coding. Discover what's new with<br>
Crystal Reports now. &nbsp;<a rel="nofollow" target="_blank" \
href="http://p.sf.net/sfu/bobj-july">http://p.sf.net/sfu/bobj-july</a><br>_______________________________________________<br>
 Htmlunit-user mailing list<br>
<a rel="nofollow" target="_blank" \
href="http://mc/compose?to=Htmlunit-user@lists.sourceforge.net">Htmlunit-user@lists.sourceforge.net</a><br>
 <a rel="nofollow" target="_blank" \
href="https://lists.sourceforge.net/lists/listinfo/htmlunit-user">https://lists.sourceforge.net/lists/listinfo/htmlunit-user</a><br>
 <br></blockquote></div><br><br clear="all"><br>-- <br>Daniel Gredler<br><a \
rel="nofollow" target="_blank" \
href="http://daniel.gredler.net/">http://daniel.gredler.net/</a><br> \
</div><br></div></div>-----Inline Attachment Follows-----<div \
class="im"><br><br><div>------------------------------------------------------------------------------<br>Let \
Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day <br> trial. \
Simplify your report design, integration and deployment - and focus on <br>what you \
do best, core application coding. Discover what's new with <br>Crystal Reports \
now.&nbsp; <a rel="nofollow" target="_blank" \
href="http://p.sf.net/sfu/bobj-july">http://p.sf.net/sfu/bobj-july</a></div> \
<br></div>-----Inline Attachment Follows-----<div \
class="im"><br><br><div>_______________________________________________<br>Htmlunit-user \
mailing list<br><a rel="nofollow" target="_blank" \
href="http://mc/compose?to=Htmlunit-user@lists.sourceforge.net">Htmlunit-user@lists.sourceforge.net</a><br>
 <a rel="nofollow" target="_blank" \
href="https://lists.sourceforge.net/lists/listinfo/htmlunit-user">https://lists.source \
forge.net/lists/listinfo/htmlunit-user</a><br></div></div></blockquote></td></tr></tbody></table><br>




      <br>------------------------------------------------------------------------------<br>
 Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day<br>
trial. Simplify your report design, integration and deployment - and focus on<br>
what you do best, core application coding. Discover what's new with<br>
Crystal Reports now. &nbsp;<a rel="nofollow" target="_blank" \
href="http://p.sf.net/sfu/bobj-july">http://p.sf.net/sfu/bobj-july</a><br>_______________________________________________<br>
 Htmlunit-user mailing list<br>
<a rel="nofollow" ymailto="mailto:Htmlunit-user@lists.sourceforge.net" \
target="_blank" href="/mc/compose?to=Htmlunit-user@lists.sourceforge.net">Htmlunit-user@lists.sourceforge.net</a><br>
 <a rel="nofollow" target="_blank" \
href="https://lists.sourceforge.net/lists/listinfo/htmlunit-user">https://lists.sourceforge.net/lists/listinfo/htmlunit-user</a><br>
 <br></blockquote></div><br><br clear="all"><br>-- <br>Daniel Gredler<br><a \
rel="nofollow" target="_blank" \
href="http://daniel.gredler.net/">http://daniel.gredler.net/</a><br> \
</div><br>-----Inline Attachment Follows-----<br><br><div \
class="plainMail">------------------------------------------------------------------------------<br>Let \
Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day <br>trial. \
Simplify your report design, integration and deployment - and focus on <br>what you \
do best, core application coding. Discover what's new with <br>Crystal Reports \
now.&nbsp; <a href="http://p.sf.net/sfu/bobj-july" \
target="_blank">http://p.sf.net/sfu/bobj-july</a></div><br>-----Inline Attachment \
Follows-----<br><br><div \
class="plainMail">_______________________________________________<br>Htmlunit-user \
mailing list<br><a ymailto="mailto:Htmlunit-user@lists.sourceforge.net" \
href="/mc/compose?to=Htmlunit-user@lists.sourceforge.net">Htmlunit-user@lists.sourceforge.net</a><br><a \
href="https://lists.sourceforge.net/lists/listinfo/htmlunit-user"  \
target="_blank">https://lists.sourceforge.net/lists/listinfo/htmlunit-user</a><br></div></blockquote></td></tr></table><br>


      



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

_______________________________________________
Htmlunit-user mailing list
Htmlunit-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/htmlunit-user


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic