Page 1 of 1

XPath Beginner

Posted: Tue Oct 09, 2012 9:18 am
by puntapret
Hello,

I'm still having trouble on using XPath

Let's say that i have an item in repository that is like this one :

Code: Select all

.//img[#'ModalPopupMain_ctl00_dynCtrl_FicheArticleView_ctl00_WTDDMarque_imgDropDrownIcon']
If i want to search for any img with id imgDropDrownIcon, this will work

Code: Select all

.//img[@id~'(?i:imgDropDrownIcon)']
But what if i want also to ensure that it must have also FicheArticleView and imgDropDownIcon IDs, and using a wild card on the "_ctl00_WTDDMarque_" part.

Any help will be appreciated.

Thank you

Re: XPath Beginner

Posted: Wed Oct 10, 2012 3:54 pm
by Support Team
Hello,

Please try the following path. It should meets your needs.

.//img[@id~'(?i:FicheArticleView*.*imgDropDrownIcon)']

Regards,
Bernhard
Ranorex Support Team