RE: Xpath Required

Hi,

Can anybody help me in getting the xpath for the below XML.

<span id=”pt1:_d_reg:region2:1:sbc1::content” class=”x2e” _adfsbv=”true”>
<span class=”xgx”>
<img width=”13″ height=”13″ border=”0″ alt=”checked” title=”checked”              src=”/admin/afr/fusion/checkMark_readonly.png”/>
</span>
E-mail the new password to the user.
</span>

I want to navigate to the <img> tag and click the check box.

Currently I’m using this – //*[@id=’pt1:_d_reg:region2:1:sbc1::content’]/span/img . But webdriver is not recognising the xpath.

Thanks,
Vishal

vishaalcbe Doctor Asked on September 15, 2014 in Selenium WebDriver.

RE: Xpath Required

on September 15, 2014.
Add Comment
2 Answers

Have You Tried this
//img[@title=’checked’]

if it return more than one element use the Index number
//img[@title=’checked’][index number]

Train Answered on September 15, 2014.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.