Title: Help
Hi ,

I used the xpath extension to get xpath of webpage, but Im having problems using the xpath with method clickElementByXPath.
Can u send me a sample example of using clickElementByXPath.
Thankyou


Julien Henry <[EMAIL PROTECTED]> wrote:

JSP is server-side only. What the user get in his browser is
Html/_javascript_. Most of the time, _javascript_ menus uses window.write()
to generate dynamically the links of the menu. It's difficult to write
the JWebUnit test, because when you inspect page source, you see
_javascript_ before it's execution.
The simplest way is to use Firefox extension to get XPath of the items
you want to click on. Then, use clickElementByXPath(...)

Hope it helps

Julien

amit h a �crit :
> Hi ,
>
> The webpage contains code written in jsp and it uses menu for
> selecting options
> The code is something like below
>
> function ACInit ()
> {
> window.setTimeout ('ShowClock()', 1000);
> menuBarInit ();
> makeActiveInit ();
> }
>
> function notIncluded ()
> {
> alert ('Does not support this function!');
> }
>
> function popup (w,h,site)
> {
> x=screen.availWidth / 2 - w / 2;
> y=screen.availHeight / 2 - h / 2;
> var popupWindow = window.open ('', '', 'width=' + w +
> ',height=' + h + ',left=' + x + ',top=' + y + ',screenX=' + x +
> ',screenY=' + y);
> var text = '
> bgcolor=#E2E2E2 scroll=no>' + site + '';
> popupWindow.document.write (text);
> }
>
> var myMenu =
> [
> [null, '
> src="" width="20" height="20"/>',
> null, null, null,
> [null, 'Development', null, null, null,
>
> [null, 'Select development',
> '/bcweb/development/compare.do', null, null],
>
> [null, 'Select development inclusive',
> '/bcweb/development/compareInd.do', null, null]
> ],
>
> I do not have much idea about this as this jsp page was written by
> other person.
> I want to write a jwebunit code that would click on the menu and then
> eventually click on the submenus present under a particular selection.
>
> But I did not find any methods that I can use from jwebunit to do this.
> Any suggestion or help will be appreciated.
>
>
> */Julien Henry <[EMAIL PROTECTED]>/* wrote:
>
>
> Hi,
>
> Could you explain what you mean by "menu" ? Do you mean a
> drop-down list ?
>
> ++
> Julien
>
> amit h a �crit :
> > Hello ,
> >
> > I am trying to test a webpage containing menus.
> > I did not find any methods for menu testing in jwebunit.
> > Is there any workaround on how menus can be tested with jwebunit.
> > Thanks in advance
> >
> >
> ------------------------------------------------------------------------
> > Talk is cheap. Use Yahoo! Messenger to make PC-to-Phone calls.
> Great
> > rates starting at 1�/min.
> >
> >
> >
> >
> >
> ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Jwebunit-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/jwebunit-users
> >
>
> This message contains information that may be privileged or
> confidential and is the property of the Capgemini Group. It is
> intended only for the person to whom it is addressed. If you are
> not the intended recipient, you are not authorized to read, print,
> retain, copy, disseminate, distribute, or use this message or any
> part thereof. If you receive this message in error, please notify
> the sender immediately and delete all copies of this message.
>
>
>
> _______________________________________________
> Jwebunit-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jwebunit-users
>
>
> ------------------------------------------------------------------------
> Yahoo! Messenger with Voice.
>
> PC-to-Phone calls for ridiculously low rates.
> ------------------------------------------------------------------------
>
> _______________________________________________
> Jwebunit-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jwebunit-users
>

This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.



_______________________________________________
Jwebunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

_______________________________________________
Jwebunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users

Reply via email to