|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
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 |
|
|
RE: How to handle this case where button is not part of form?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: webtest-admin@... [mailto:webtest-admin@...] On Behalf Of Ali, Haneef Sent: Wednesday, October 07, 2009 3:46 PM To: webtest@... 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 |
|
|
Re: RE: How to handle this case where button is not part of form?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 <Matt.Brown@...> 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: webtest-admin@... [mailto:webtest-admin@...] > On Behalf Of Ali, Haneef > Sent: Wednesday, October 07, 2009 3:46 PM > To: webtest@... > 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 WebTest@... http://lists.canoo.com/mailman/listinfo/webtest |
|
|
Re: How to handle this case where button is not part of form?Hi,
canonical XPath are evil. What about following ones: //input[@name = 'customize'] or //input[@title = 'Customize your needs'] Concerning WebDriver, yes I want to use in WebTest since a long time. Most of the work is already done on my laptop... but it's not complete. I just need more free time... or a client interested to pay me for this feature. Just drop me a mail if you want to finance this implementation. Cheers, Marc. Ali, Haneef a écrit : > 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 > > > > > > > _______________________________________________ WebTest mailing list WebTest@... http://lists.canoo.com/mailman/listinfo/webtest |
| Free embeddable forum powered by Nabble | Forum Help |