To get the xpath of an element all you need to do is
1. inspect the webpage
2. select the element you want the xpath for.
3. right click on the code higlighted
4. Go to copy
5. Go to copy Xpath
Done.
Here is a screeshot I took to explain the above steps.
![](https://www.edureka.co/community/?qa=blob&qa_blobid=1657800305462566794)
Hope this helps.