You can get the XPather addon for Firefox. It will provide you with the full xpath to anything on the page. You can then shorten it and use the Eval function to make sure it still works. It's VERY handy. I never leave home without it. :)
On Wed, Oct 7, 2009 at 4:32 PM, Matt Brown <[email protected]> wrote: > Are you able to edit the page under test? You could simply add an id to it > to make it easier to test. > > Firebug is capable of telling you the exact XPath to an element, I belive > there are other useful Firefox plugins you could use for the same purpose, > although I've found that relying on overly long/deep XPath statements can > lead to very brittle tests when other contents of the page change. > ________________________________ > From: [email protected] [mailto:[email protected]] > On Behalf Of Ali, Haneef > Sent: Wednesday, October 07, 2009 3:46 PM > To: [email protected] > Subject: [Webtest] How to handle this case where button is not part of form? > > Hi, > > > > I have a strange case, which I’m not sure how to test it. Can someone give > me a hint? Btw I’m a newbie to webtest. > > > > > > I have button to click which is not part of any form and it doesn’t have an > id attribute. How to click this button? Is xpath only way? Also is there a > easy way to figure out the xpath of the element? It is nested within so > many div/table/span tags. Is there something like > <callJavascriptFunction name=” lowestConfig.submit()” /> > > > > <input name="customize" title="Customize your needs" > class="commButton115_20" style="width: 120px;" > onclick="lowestConfig.submit();" type="submit" value="Customize & Buy »"/> > > > > > > Also is there any proposal to have pluggable webdriver? Something similar > to JWebunit which can be used either with Selenium instead of HtmlUnit . > > > > > > Thanks, > > Haneef > > > > > > -- Hanlon's Razor: ``Never attribute to malice that which can be adequately explained by stupidity''. _______________________________________________ WebTest mailing list [email protected] http://lists.canoo.com/mailman/listinfo/webtest

