In which case Xpath won’t work ??

Hello everyone,

Could you please explain , in which situations Xpath won’t be work. ?? In this situation which locator is best ??

Thanks,
DUrga

Default Asked on August 9, 2015 in Selenium WebDriver.
Add Comment
  • 3 Answer(s)

    Xpath works most of the times. As far as i have concerned there no cases where xpath doesnot work.

    If you need to switch to frames then you need to specify the id , name or index or in cases where you need to switch between windows.

    Please let us know if you are finding issues with Xpath

    Supporter Answered on August 9, 2015.
    Add Comment

    automate way2sms site u will understand ….

    Default Answered on August 13, 2015.
    Add Comment

    Oh, I know what you mean)
    I’ ve faced with such sities
    But you shouldn’t give up
    use complex xpath
    .//*[contains(@id, ‘menu’)]/a[contains(text(),’Home’)]

    instead of
    .//*[@id=’menu-item-30′]/a
    Reviewer Answered on August 14, 2015.
    Add Comment
  • Your Answer

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