-3

This is my xpath - //*[@id="284623"]/div[4]/div[4]/img

Unable to locate element using above XPath.

Please help..!

closed as unclear what you're asking by NarendraR, Bharat Mane, Alexey R., Michael Durrant, alecxe Feb 18 '18 at 2:24

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • What programming language do you use? – Alexey R. Feb 14 '18 at 16:49
  • What are you trying to find it with? For what purpose? What error are you getting? – Kate Paulk Feb 14 '18 at 20:30
  • It's better to add detail info about your exact problem. Add your HTML code to locate this particular element. – Bharat Mane Feb 15 '18 at 7:14
1

I have three answers for you.

  1. You could open the source code and fine an element which matches the XPath, which from the information you have given will be structured like this:

    <? id="284623">
    <div></div>
    <div></div>
    <div></div>
    <div>
      <div></div>
      <div></div>
      <div></div>
      <div><img></div>
    </div>
    
  2. Or You can open the dev tools in Chrome (F12) and in the console view and type in:

    $x("//*[@id='284623']/div[4]/div[4]/img")
    

    When you expand out the tree it should highlight the object on the screen for you.

  3. Alternatively you can take a couple of hours to read through through the W3 School XPath Tutorial which will explain how the syntax navigates the tree structure.

  • How is your answer related to selenium-webdriver? – Alexey R. Feb 14 '18 at 17:37
  • Which language are you using? – Brook Feb 14 '18 at 21:01

Not the answer you're looking for? Browse other questions tagged or ask your own question.