Home > Blockchain >  How to find the correct xpath for the element
How to find the correct xpath for the element

Time:03-29

HTML:

<div  data-team="test-invite14">
    <div ><span  style="background-color: rgb(223, 103, 255);">T</span>
    </div>
    <div >Test.invite14</div>
</div>

I have tried multiple times but didn't got positive response Can anyone help me?

CodePudding user response:

//div[@class='team']

//div[@data-team='test-invite14']

Use any one of this and try

CodePudding user response:

The correct xpath are as follows:

  • XPATH for T:

    //div[@class='team']/div[@class='team-body']/span[text()='T']
    
  • XPATH for Test.invite14:

    //div[@class='team']//div[@class='team-foot' and text()='Test.invite14']
    
  • Related