What does this part of the expression do?
 
    a['Batch Processing']

Did you mean?
 
    a[text()='Batch Processing']
 

--
Jonathan Rosenberg
Founder & Executive Director
Tabby's Place
http://www.tabbysplace.org <http://www.tabbysplace.org/> 


-----Original Message-----
From: [email protected] [mailto:[email protected]]
On Behalf Of Gert Pauwels
Sent: Wednesday, March 17, 2010 9:42 AM
To: [email protected]
Subject: [Webtest] Problem with exact match in xpath


Hi,
 
I am using clickLink with an xpath, not verifyXpath.
And I have an issue with the following xpath:
 
//div/ul/li[contains(@id, 'menu')][3]/ul/li[3]/ul/li[1]/a['Batch
Processing']
 
Although this is a correct xpath, I am not at all sure that Canoo reads the
text inside the square brackets in the /a tag. I ran several tests and had
the impression that it would not fail if I changed the xpath to the
following one:
 
//div/ul/li[contains(@id, 'menu')][3]/ul/li[3]/ul/li[1]/a['Batch rocessing']
 
And my fear is confirmed: The webtest does not fail on this. This means that
if I don't find a way to get rid of it, I need to make a supplementary set
of tests to verify the captions of the links on my screen.
Would this help:
 
//div/ul/li[contains(@id, 'menu')][3]/ul/li[3]/ul/li[1]/a[contains('Batch
Processing')]
 
Thanks
 
Gert
 


  _____  

Hotmail: Trusted email with Microsoft's powerful SPAM protection. Sign up
<https://signup.live.com/signup.aspx?id=60969> now. 

Reply via email to