Hi,

I'm a new Webtest user. Could anybody tell me, if Webtest works well in
most situations with JSF and Javascript. We use JBoss Seam for our
application and I'm currently trying to automatically upload a file to
the server, for which a have to load a new page via a submenue with the
clickElement function. But that does not work. 

Should I use another webtest function or does the webtest clickElement
have a problem with JSF generated pages?

I could login into the application and can verify some text on the
responding page. But when I try to clickElement the new page where I
have to select the file to upload will not be loaded by webtest.

Does there exists a possibility to tell JSF to use fixed htmlId's. so I
don't have to modify the already used htmlId's in my webtest scripts, if
the layout changes?

Attached I provide the code from the webtest script an the relevant
automatically generated Javascript code.
<clickElement description="Click Element upload file"
htmlId="j_id6:j_id14" />

Now the part from the Javascript page with form section. I used the id
j_id6:j_id14  for the ClickElement action for the Upload File submenue:

 id="j_id6:j_id14" onclick="this.className='dr-menu-item
dr-menu-item-enabled rich-menu-item rich-menu-i
tem-enabled ';
A4J.AJAX.Submit('_viewRoot','j_id6',event,{'parameters':{'j_id6:j_id14':
'j_id6:j_id14'} ,'act
ionUrl':'/myapp/pages/MyHome.seam'} );" onmouseout="if
(RichFaces.Menu.isWithin(event, this)) re
turn;    this.className='dr-menu-item dr-menu-item-enabled
rich-menu-item rich-menu-item-enabled  ';    $('j_
id6:j_id14').style.cssText=';';
$('j_id6:j_id14:icon').className='dr-menu-icon rich-menu-item-icon ';
E
lement.removeClassName($('j_id6:j_id14:anchor'),
'rich-menu-item-label-selected');" onmouseover="if (RichFace
s.Menu.isWithin(event, this)) return;    this.className='dr-menu-item
dr-menu-item-hover rich-menu-item rich-
menu-item-hover  ';;    $('j_id6:j_id14').style.cssText='; ; ;';
$('j_id6:j_id14:icon').className='dr-menu
-icon dr-menu-icon-selected rich-menu-item-icon
rich-menu-item-icon-selected ';    Element.addClassName($('j_
id6:j_id14:anchor'), 'rich-menu-item-label-selected');"
onmouseup="Event.stop(event); " style="; "><span clas
s="dr-menu-icon rich-menu-item-icon  " id="j_id6:j_id14:icon"><img
height="16" src="/myapp/a4j_3_2_0.SR1-SN
APSHOTimages/spacer.gif.seam" width="16" /></span><span
class="rich-menu-item-label " id="j_id6:j_id14:anchor
">Upload File</span>




Regards,
Roland

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to