XPath Beginner

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
puntapret
Posts: 34
Joined: Fri Sep 14, 2012 11:05 am

XPath Beginner

Post by puntapret » Tue Oct 09, 2012 9:18 am

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

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: XPath Beginner

Post by Support Team » Wed Oct 10, 2012 3:54 pm

Hello,

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

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

Regards,
Bernhard
Ranorex Support Team
.
Image