[Webtest] Webtest and AJAX

Harman Birdi Harman Birdi" <harman.birdi@gmail.com
Wed, 10 Sep 2008 19:26:10 -0700


------=_Part_128782_6251307.1221099970079
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi,

Just as an update the problem I am experiencing is similar to the one shown
in this thread, but
there is no resolution to it. Also, how can I emulate the choices available
for the population of
the textfield. In our application, the names matching the contacts is pulled
as the user is
typing. Once I have typed enough, it should dwindle down to one name that I
want to select.

It is just not working. I have even tried fiddling around with xpath now,
but to no avail.
Once again, I am already on htmlunit-2.2 in Build1716 but it still does not
work.

TIA
 Re: Re: richFaces Ajax + content not updated[image: Click to flag this
post] <javascript: void Nabble.setFlag(18362442);>

by Marc Guillemot  <http://www.nabble.com/user/UserProfile.jtp?user=1438> Jul
09, 2008; 07:04am :: Rate this Message:
<http://www.nabble.com/richFaces-Ajax-%2B-content-not-updated-td18341462.html#>
<http://www.nabble.com/richFaces-Ajax-%2B-content-not-updated-td18341462.html#><http://www.nabble.com/richFaces-Ajax-%2B-content-not-updated-td18341462.html#><http://www.nabble.com/richFaces-Ajax-%2B-content-not-updated-td18341462.html#><http://www.nabble.com/richFaces-Ajax-%2B-content-not-updated-td18341462.html#><http://www.nabble.com/richFaces-Ajax-%2B-content-not-updated-td18341462.html#>
<http://www.nabble.com/richFaces-Ajax-%2B-content-not-updated-td18341462.html#>
-
Use ratings to moderate (? <http://www.nabble.com/help/Answer.jtp?id=16>)

 Reply <http://www.nabble.com/forum/Reply.jtp?post=18362442> | Reply to
Author <http://www.nabble.com/user/SendEmail.jtp?type=pm&post=18362442> |
Print <http://www.nabble.com/forum/PrintPost.jtp?post=18362442> | View
Threaded <javascript: void Nabble.setView('newthreaded',18362442);> | Show
Only this Message<http://www.nabble.com/Re%3A-Re%3A-richFaces-Ajax-%2B-content-not-updated-p18362442.html>
 Hi,

I guess that it doesn't work with HtmlUnit-2.1 but it should work in a
near future, once HtmlUnit-2.2 is integrated in *WebTest*. Inded the
JSFUnit guys had the same issue with
http://jsfunit.demo.jboss.com/jboss-jsfunit-examples-richfaces/richfaces/support.jsf
and I've fixed for a few weeks.

Cheers,
Marc.

On Wed, Sep 10, 2008 at 11:33 AM, Soula, William <wsoula@pointserve.com>wrote:

>  Same problem again now the images are in a flickr account I created for
> this: http://www.flickr.com/photos/30374652@N03/2845700355/ and
> http://www.flickr.com/photos/30374652@N03/2846534450/
>
>  ------------------------------
> *From:* Soula, William
> *Sent:* Wednesday, September 10, 2008 1:22 PM
> *To:* 'webtest@lists.canoo.com'
> *Subject:* Re: [Webtest] Webtest and AJAX
>
>  Last attempt got filtered out for being too big.  I deleted some of the
> response below and am trying again.
>
>  ------------------------------
> *From:* Soula, William
> *Sent:* Wednesday, September 10, 2008 1:14 PM
> *To:* 'Harman Birdi'; 'webtest@lists.canoo.com'
> *Subject:* RE: [Webtest] Webtest and AJAX
>
>  I'm kinda busy, any help here list?
>
>  ------------------------------
> *From:* Harman Birdi [mailto:harman.birdi@gmail.com]
> *Sent:* Wednesday, September 10, 2008 12:33 PM
> *To:* Soula, William
> *Subject:* Re: [Webtest] Webtest and AJAX
>
>
> William - Could you please let me know in what situation you had to use
> XPath? For me, I have a input field which
> gets a dynamic dropdown values as I type (AJAX with XMLHttpRequest and
> XMLResponseText), which I can select.
> I can see with Firebug that the following is happening, but how do I get
> the value that I want to select for the
> input field.
>
> The place where it shows "Elma Axtell" is where I am typing and it
> retrieves all the possible values using Ajax
> dynamically. The XPath expression to the left shows the possible choices.
> How do I narrow it to the one I want
> to pick since there are no attributes there that I can use. You can see
> that in the HTML of the Firebug window.
> Once I select the value here, the hidden field associated with the input
> field gets the id of the selected value.
>
> I would really appreciate it if you could point me to the right direction.
> I have attached couple of snapshots of the
> application, so you know what I am referring to.
>
> Thanks,
> --Harman
>
> On Wed, Sep 10, 2008 at 10:05 AM, Soula, William <wsoula@pointserve.com>wrote:
>
>>  You can use xpather to find xpaths (it is a firefox extension) although
>> I generally don't like them as they are absolute xpaths instead of relative,
>> which is more robust.  I got most of my XPath knowledge from this site:
>> http://www.w3schools.com/xpath/default.asp  XPath is very powerful and
>> has gotten me out of a lot of situations.
>>
>
>

------=_Part_128782_6251307.1221099970079
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<div dir=3D"ltr"><div>&nbsp;</div>
<div>Hi,</div>
<div>&nbsp;</div>
<div>Just as an update the problem I am experiencing is similar to the one =
shown in this thread, but<br>there is no resolution to it. Also,&nbsp;how c=
an I emulate the choices available for the population of<br>the textfield. =
In our application, the names matching the contacts is pulled as the user i=
s</div>

<div>typing. Once I have typed enough, it should dwindle down to one name t=
hat I want to select.</div>
<div>&nbsp;</div>
<div>It is just not working. I have even tried fiddling around with xpath n=
ow, but to no avail.</div>
<div>Once again, I am already on htmlunit-2.2 in Build1716 but it still doe=
s not work.<br><br>TIA</div>
<div><a name=3D"a18362442">
<h2>Re: Re: richFaces Ajax + content not updated</h2><a id=3D"nabble.aflag1=
8362442" title=3D"Click to flag this post" href=3D"javascript: void Nabble.=
setFlag(18362442);"><img id=3D"nabble.flag18362442" onmouseover=3D"status =
=3D alt; return true;" onmouseout=3D"status =3D defaultStatus; return true;=
" height=3D"15" alt=3D"Click to flag this post" src=3D"http://www.nabble.co=
m/images/icon_unflagged.png" width=3D"15" border=3D"0"></a> <span id=3D"nab=
ble.rating18362442">

<img height=3D"12" src=3D"http://www.nabble.com/images/icon_star_blue.png" =
width=3D"12" border=3D"0"><img height=3D"12" src=3D"http://www.nabble.com/i=
mages/icon_star_blue.png" width=3D"12" border=3D"0"><img height=3D"12" src=
=3D"http://www.nabble.com/images/icon_star_blue.png" width=3D"12" border=3D=
"0"><img height=3D"12" src=3D"http://www.nabble.com/images/icon_star_blue.p=
ng" width=3D"12" border=3D"0"> </span>
<div class=3D"message-actions weak-color">
<p class=3D"message-actions1">by

 <a href=3D"http://www.nabble.com/user/UserProfile.jtp?user=3D1438" target=
=3D"_top" rel=3D"nofollow">Marc Guillemot

 </a><span class=3D"weak-color">

Jul 09, 2008; 07:04am</span> :: Rate this Message: <a onmouseover=3D"Nabble=
.mouseover(18362442,0); return true;" title=3D"Click to mark as Spam" oncli=
ck=3D"Nabble.clicked(18362442,0); return false;" onmouseout=3D"Nabble.mouse=
out(18362442); return true;" href=3D"http://www.nabble.com/richFaces-Ajax-%=
2B-content-not-updated-td18341462.html#"><img id=3D"nabble.spam18362442" st=
yle=3D"VERTICAL-ALIGN: middle" height=3D"12" alt=3D"" src=3D"http://www.nab=
ble.com/images/icon_blocked_gray.png" width=3D"12" border=3D"0"></a> <a onm=
ouseover=3D"Nabble.mouseover(18362442,1); return true;" title=3D"Click to r=
ate as Poor Post" onclick=3D"Nabble.clicked(18362442,1); return false;" onm=
ouseout=3D"Nabble.mouseout(18362442); return true;" href=3D"http://www.nabb=
le.com/richFaces-Ajax-%2B-content-not-updated-td18341462.html#"><img id=3D"=
nabble.star18362442-1" style=3D"VERTICAL-ALIGN: middle" height=3D"12" alt=
=3D"" src=3D"http://www.nabble.com/images/icon_star_grey.png" width=3D"12" =
border=3D"0"></a><a onmouseover=3D"Nabble.mouseover(18362442,2); return tru=
e;" title=3D"Click to rate as Below Average Post" onclick=3D"Nabble.clicked=
(18362442,2); return false;" onmouseout=3D"Nabble.mouseout(18362442); retur=
n true;" href=3D"http://www.nabble.com/richFaces-Ajax-%2B-content-not-updat=
ed-td18341462.html#"><img id=3D"nabble.star18362442-2" style=3D"VERTICAL-AL=
IGN: middle" height=3D"12" alt=3D"" src=3D"http://www.nabble.com/images/ico=
n_star_grey.png" width=3D"12" border=3D"0"></a><a onmouseover=3D"Nabble.mou=
seover(18362442,3); return true;" title=3D"Click to rate as Average Post" o=
nclick=3D"Nabble.clicked(18362442,3); return false;" onmouseout=3D"Nabble.m=
ouseout(18362442); return true;" href=3D"http://www.nabble.com/richFaces-Aj=
ax-%2B-content-not-updated-td18341462.html#"><img id=3D"nabble.star18362442=
-3" style=3D"VERTICAL-ALIGN: middle" height=3D"12" alt=3D"" src=3D"http://w=
ww.nabble.com/images/icon_star_grey.png" width=3D"12" border=3D"0"></a><a o=
nmouseover=3D"Nabble.mouseover(18362442,4); return true;" title=3D"Click to=
 rate as Above Average Post" onclick=3D"Nabble.clicked(18362442,4); return =
false;" onmouseout=3D"Nabble.mouseout(18362442); return true;" href=3D"http=
://www.nabble.com/richFaces-Ajax-%2B-content-not-updated-td18341462.html#">=
<img id=3D"nabble.star18362442-4" style=3D"VERTICAL-ALIGN: middle" height=
=3D"12" alt=3D"" src=3D"http://www.nabble.com/images/icon_star_grey.png" wi=
dth=3D"12" border=3D"0"></a><a onmouseover=3D"Nabble.mouseover(18362442,5);=
 return true;" title=3D"Click to rate as Excellent Post" onclick=3D"Nabble.=
clicked(18362442,5); return false;" onmouseout=3D"Nabble.mouseout(18362442)=
; return true;" href=3D"http://www.nabble.com/richFaces-Ajax-%2B-content-no=
t-updated-td18341462.html#"><img id=3D"nabble.star18362442-5" style=3D"VERT=
ICAL-ALIGN: middle" height=3D"12" alt=3D"" src=3D"http://www.nabble.com/ima=
ges/icon_star_grey.png" width=3D"12" border=3D"0"></a> <a onmouseover=3D"Na=
bble.mouseover(18362442,-1); return true;" title=3D"Click to clear rating" =
onclick=3D"Nabble.clicked(18362442,-1); return false;" onmouseout=3D"Nabble=
.mouseout(18362442); return true;" href=3D"http://www.nabble.com/richFaces-=
Ajax-%2B-content-not-updated-td18341462.html#"><img id=3D"nabble.star183624=
42-0" style=3D"VERTICAL-ALIGN: middle" alt=3D"" src=3D"http://www.nabble.co=
m/images/icon_clear_rating.png" border=3D"0"></a> <span id=3D"nabble.descri=
ptor18362442">- Use ratings to moderate (<a title=3D"Click for more info" h=
ref=3D"http://www.nabble.com/help/Answer.jtp?id=3D16">?</a>)</span></p>

<p class=3D"message-actions2">

<a href=3D"http://www.nabble.com/forum/Reply.jtp?post=3D18362442" rel=3D"no=
follow">Reply</a> | <a href=3D"http://www.nabble.com/user/SendEmail.jtp?typ=
e=3Dpm&amp;post=3D18362442" target=3D"_top" rel=3D"nofollow">Reply to Autho=
r</a>

 | <a href=3D"http://www.nabble.com/forum/PrintPost.jtp?post=3D18362442" ta=
rget=3D"_new" rel=3D"nofollow">Print</a> | <a href=3D"javascript: void Nabb=
le.setView(&#39;newthreaded&#39;,18362442);">View Threaded</a> | <a href=3D=
"http://www.nabble.com/Re%3A-Re%3A-richFaces-Ajax-%2B-content-not-updated-p=
18362442.html">Show Only this Message</a> </p>
</div>
<div class=3D"message-details">
<div id=3D"nabble.pending18362442"></div>
<div class=3D"message-text"><span>Hi, </span><br><br><span>I guess that it =
doesn&#39;t work with HtmlUnit-2.1 but it should work in a </span><br><span=
>near future, once HtmlUnit-2.2 is integrated in <b class=3D"highlight">Web=
Test</b>. Inded the </span><br>
<span>JSFUnit guys had the same issue with </span><br><a href=3D"http://jsf=
unit.demo.jboss.com/jboss-jsfunit-examples-richfaces/richfaces/support.jsf"=
 target=3D"_top" rel=3D"nofollow"><span>http://jsfunit.demo.jboss.com/jboss=
-jsfunit-examples-richfaces/richfaces/support.jsf</span></a><br>
<span>and I&#39;ve fixed for a few weeks. </span><br><br><span>Cheers, </sp=
an><br><span>Marc. </span><br><br></div></div></a></div>
<div class=3D"gmail_quote">On Wed, Sep 10, 2008 at 11:33 AM, Soula, William=
 <span dir=3D"ltr">&lt;wsoula@pointserve.com&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"PADDING-LEFT: 1ex; MARGIN: 0px 0=
px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>
<div dir=3D"ltr" align=3D"left"><span><font face=3D"Arial" color=3D"#0000ff=
" size=3D"2">Same problem again now the images are in a flickr account I cr=
eated for this: <a href=3D"http://www.flickr.com/photos/30374652@N03/284570=
0355/" target=3D"_blank">http://www.flickr.com/photos/30374652@N03/28457003=
55/</a>&nbsp;and <a href=3D"http://www.flickr.com/photos/30374652@N03/28465=
34450/" target=3D"_blank">http://www.flickr.com/photos/30374652@N03/2846534=
450/</a></font></span></div>
<br>
<div lang=3D"en-us" dir=3D"ltr" align=3D"left">
<hr>
<font face=3D"Tahoma" size=3D"2"><b>From:</b> Soula, William <br><b>Sent:</=
b> Wednesday, September 10, 2008 1:22 PM=20
<div class=3D"Ih2E3d"><br><b>To:</b> &#39;<a href=3D"mailto:webtest@lists.c=
anoo.com" target=3D"_blank">webtest@lists.canoo.com</a>&#39;<br></div>
<div class=3D"Ih2E3d"><b>Subject:</b> Re: [Webtest] Webtest and AJAX<br></d=
iv></font><br></div>
<div></div>
<div dir=3D"ltr" align=3D"left"><font face=3D"Arial" color=3D"#0000ff" size=
=3D"2"><span>Last attempt got filtered out for being too big.&nbsp; I delet=
ed some of the response below and am trying again.</span></font></div><br>
<div lang=3D"en-us" dir=3D"ltr" align=3D"left">
<hr>
<font face=3D"Tahoma" size=3D"2"><b>From:</b> Soula, William <br><b>Sent:</=
b> Wednesday, September 10, 2008 1:14 PM<br><b>To:</b> &#39;Harman Birdi&#3=
9;; &#39;<a href=3D"mailto:webtest@lists.canoo.com" target=3D"_blank">webte=
st@lists.canoo.com</a>&#39;<br>
<b>Subject:</b> RE: [Webtest] Webtest and AJAX<br></font><br></div>
<div class=3D"Ih2E3d">
<div></div>
<div dir=3D"ltr" align=3D"left"><span><font face=3D"Arial" color=3D"#0000ff=
" size=3D"2">I&#39;m kinda busy, any help here list?</font></span></div><br=
>
<div lang=3D"en-us" dir=3D"ltr" align=3D"left">
<hr>
<font face=3D"Tahoma" size=3D"2"><b>From:</b> Harman Birdi [mailto:<a href=
=3D"mailto:harman.birdi@gmail.com" target=3D"_blank">harman.birdi@gmail.com=
</a>] <br><b>Sent:</b> Wednesday, September 10, 2008 12:33 PM<br><b>To:</b>=
 Soula, William<br>
<b>Subject:</b> Re: [Webtest] Webtest and AJAX<br></font><br></div>
<div></div>
<div dir=3D"ltr">
<div>&nbsp;</div>
<div>William - Could you please let me know in what situation you had to us=
e XPath? For me, I have a input field which</div>
<div>gets a dynamic dropdown values as I type (AJAX with XMLHttpRequest and=
 XMLResponseText), which I can select.</div>
<div>I can see with Firebug that the following is happening, but how do I g=
et the value that I want to select for the </div>
<div>input field.</div>
<div>&nbsp;</div>
<div>The place where it shows &quot;Elma Axtell&quot; is where I am typing =
and it retrieves all the possible values using Ajax<br>dynamically. The XPa=
th expression to the left shows the possible choices. How do I narrow it to=
 the one I want<br>
to pick since there are no attributes there that I can use. You can see tha=
t in the HTML of the Firebug window.</div>
<div>Once I select the value here, the hidden field associated with the inp=
ut field gets the id of the selected value.</div>
<div>&nbsp;</div>
<div>I would really appreciate it if you could point me to the right direct=
ion. I have attached couple of snapshots of the<br>application, so you know=
 what I am referring to.&nbsp;</div>
<div>&nbsp;</div>
<div>Thanks,</div>
<div>--Harman<br><br></div>
<div class=3D"gmail_quote">On Wed, Sep 10, 2008 at 10:05 AM, Soula, William=
 <span dir=3D"ltr">&lt;<a href=3D"mailto:wsoula@pointserve.com" target=3D"_=
blank">wsoula@pointserve.com</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"PADDING-LEFT: 1ex; MARGIN: 0px 0=
px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>
<div dir=3D"ltr" align=3D"left"><span><font face=3D"Arial" color=3D"#0000ff=
" size=3D"2">You can use xpather to find xpaths (it is a firefox extension)=
 although I generally don&#39;t like them as they are absolute xpaths inste=
ad of relative, which is more robust.&nbsp; I got most of my XPath knowledg=
e from this site: <a href=3D"http://www.w3schools.com/xpath/default.asp" ta=
rget=3D"_blank">http://www.w3schools.com/xpath/default.asp</a>&nbsp; XPath =
is very powerful and has gotten me out of a lot of situations.</font></span=
></div>
</div></blockquote></div><br></div></div></div></blockquote></div><br></div=
>

------=_Part_128782_6251307.1221099970079--