Hi Ian, maybe you should use a returnstatement in your onclick eventhandeler. onclick="javascript:ok_shopNow.action='jfn?entry=guest&orgTypeCode=R ESIDENTIAL&currency='+ok_shopNow.currencyChoice.options[ok_shopNow.c urrencyChoice.selectedIndex].value; return true; " Otherwise the browser or webtest wont know wheter the form must be submited or not. Another way would be to use type="button" instead of submit and do the submit in eventhandling. Or you use the onsubmit eventhandling on the form. Regards Beat
________________________________ Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im Auftrag von Ian Phillips Gesendet: Freitag, 14. November 2008 10:36 An: webtest@lists.canoo.com; Marc Guillemot Betreff: Re: [Webtest] Button being clicked but new page not seen Hi Mark. I have attached the page with the button that is not clicked by WebTest. We have the 2.6 version of WebTest installed. This is the line of code we are using to click the button: <clickButton label="Shop now"/> The webtest report says the button has been clicked successfully but the following page is not loaded and so the following step fails. I have tried using xpath but hit a bug in WebTest. Thanks Ian On Fri, Nov 14, 2008 at 9:41 AM, Marc Guillemot <[EMAIL PROTECTED]> wrote: Ian, if the application has changed, the old version doesn't really matter anymore. If you find that WebTest doesn't behave as it should when clicking the button, please provide the necessary information to reproduce the problem. Cheers, Marc. -- Web: http://www.efficient-webtesting.com Blog: http://mguillem.wordpress.com Ian Phillips wrote: > Hi. > > I had a test that worked but a change in the code has now broken it. I > had a simple <clickButton label="Shop now!"/> statement before but this > no longer works. The report says it has clicked the button but fails on > the next statement in the script as the same page is displayed, not the > expected one. > > When using the WTR is suggests this <clickButton label="Shop now"/> but > this does not work. > > Any ideas how to get this to work? > > > > This is the code OLD and NEW. > > OLD > > <form id="ok" class="generalForm" > action="jfn?entry=guest&orgTypeCode=RESIDENTIAL" method="post" name="ok"> > <span class="button"> > <input class="submit" type="submit" value="Shop now!" > name="submit"/> > </span> > </form> > > > > NEW > > > <form id="ok_shopNow" class="generalForm" method="post" name="ok_shopNow"> > <span class="button"> > <input class="submit" type="submit" > onclick="javascript:ok_shopNow.action='jfn?entry=guest&orgTypeCode=RESID ENTIAL¤cy='+ok_shopNow.currencyChoice.options[ok_shopNow.currencyC hoice.selectedIndex].value" > value="Shop now" name="submit"/> > </span> > <span id="menuLvelOneCurrencyContainer"> > </span> > </form> > > > Do I need to do something to fire the onclick event? > > Ian _______________________________________________ WebTest mailing list WebTest@lists.canoo.com http://lists.canoo.com/mailman/listinfo/webtest