The correct syntax for storeAttribute would (probably)
be:
//[EMAIL PROTECTED]'ThreeBanner2']/[EMAIL PROTECTED]
//[EMAIL PROTECTED]'ThreeBanner2']/a is the
elementLocator
and href is the
attribute of this element that you want to save the value
of.
- Guillaume Boudreau
From: Terry Simpson [mailto:[EMAIL PROTECTED] Sent: Friday, October 21, 2005 10:24 AM To: [EMAIL PROTECTED]; selenium-users@lists.public.thoughtworks.org Subject: RE: [Selenium-devel] Selenium failure Hi.
Thanks. The bit of the code I
was trying to save was the href. I changed the
storeAttribute to storeText and it works a treat
now Thanks
again Terry
Simpson From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Guillaume Boudreau Note: This should be on
the user mailing list, not the devel. If you reply, please do at selenium-users@lists.public.thoughtworks.org storeAttribute is used
to store the attribute value of a tag. I don't think that's what you want to do.
Maybe you want to use storeText... The error is probably
caused by the fact that you're not using the correct syntax for storeAttribute,
which is [EMAIL PROTECTED]... Exactly what part of
the HTML code you pasted do you want to save in the "banner1" variable
? - Guillaume
Boudreau From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Terry Simpson Hi. Hope someone can help. I am new
to software testing and exploring the features in Selenium
0.6.0. I’m trying to store an attribute
using Xpath as a locator but Selenium is telling me there is a failure.
Using the same locator with
clickAndWait action works fine The message in the log console is
listed below ·
Executing: |open |
http://uat.pandanet.coop/cooptravel | | ·
Executing: |storeAttribute |
//[EMAIL PROTECTED]'ThreeBanner2']/[EMAIL PROTECTED] | banner1 | ·
Unexpected
Exception: number -> 51, description -> DOM-L3-XPath 0.0.3.0: Invalid
_expression_, "_expression_ expected. //[EMAIL PROTECTED]'ThreeBanner2']/a[<--", message
-> DOM-L3-XPath 0.0.3.0: Invalid _expression_, "_expression_
expected.//[EMAIL PROTECTED]'ThreeBanner2']/a[<--", code -> 51, name ->
XPathException The HTML
code concerned is listed below <div id="ThreeBanner2" class="BannerAd"><a href="http://www.holidayautos.co.uk/cgi-bin/liveweb.sh/QSearch.w?ctryref=GBR&lang=EN&aff=xcooptraveldirect" name="Holiday Car Hire"><img src="images/banners/carhire2wide.gif" width="230" height="60" alt="Holiday Car Hire" /></a></div>
Many
thanks Terry
Co-operative IT is part of The Midcounties Co-operative West Midlands Co-operative Society (WMCS) and Oxford, Swindon and Gloucester Co-operative Society (OSG) have merged to form The Midcounties Co-operative. The information contained in this e-mail is confidential and is intended solely for the named recipient(s) only. If you are not the named recipient(s) you should not disseminate, distribute or copy this e-mail. If you have received this email in error please notify us by telephone on (+44 ) 0845 4585 650 immediately and delete the message and any copies from your computer. The Midcounties Co-operative has taken every reasonable precaution to ensure that any attachment to this e-mail has been checked for viruses. However, we cannot accept liability for any damage sustained as a result of any such software viruses and advise you to carry out your own virus check before opening any attachment. Furthermore, we do not accept responsibility for any change made to this message after it was sent by the sender. |
_______________________________________________ Selenium-users mailing list Selenium-users@lists.public.thoughtworks.org http://lists.public.thoughtworks.org/mailman/listinfo/selenium-users