If you want to find descendants of Div tag you need to use below syntax//div[@id='browse-category']/descendant::*If you want a specific element from descendants then use below syntaxHere i want to identify Payment link using descendant.//div[@id='browse-category']/descendant::a[@data-category='Payment']In the above example descendant will search for child elements and child's child elements as well.UL is the child element for DIV and LI is the child element for UL and A is child element for LI. As we used descendant it will check for the matching element.Following:Selects
everything in the document after the closing tag of the current node.selects all elements after closing tag of P//p[@class='fk-font-14']/following::*

if you want a specific element using following below is the example

//p[@class='fk-font-14']/following::div[@id='fk-mainfooter-id']

Following-sibling:Selects
all siblings after the current node.//div[@id='browse-category']/ul/li/following-sibling::*if you want a specific element then//form[@class='faqsearchform']/following-sibling::div

Preceding:Selects all nodes that appear before the current node in the document, except ancestors, attribute nodes and namespace nodespreceding-siblingSelects all siblings before the current nodeHere is the example://div[@id='browse-category']/preceding-sibling::form

Now Lets see a real time example how to use the above mentioned xpath Axes:Below is scenario:

Navigate to flipkart

add two products to cart

I want to remove one product based on its name.

Simple xpath without using product name --- //a[@class='cart-remove-item fk-inline-block fk-uppercase'] but it always identifies first Remove button.

First Step: I will identify xpath for product Name

//span[text()='HP 15-af114AU Notebook(AMD Quad Core A8/ 4GB/...']

From there onward using xpath Axes i need to identify Remove link.

By loooking at DOM we can understand that there are two TR tags

in one TR --we have product details and in another TR we have remove link.

so i have to traverse to second TR.

Second Step: Inorder to do that i need to traverse to parent element of span

very nice blogs, i have to learning for lot of information for this sites. Sharing for wonderful information. Our on-line coaching supplier gained the high commonplace name through worldwide for its teaching.Oracle fusion financials training

CALFRE handles oracle fusion financials online training and its modules maintaining classroom based training with the self-paced videos. An expert having ten plus years of self-experience handles the training period through online and explains each and every point perfectly. We recently launched our institute in the USA and getting the best reputation over there.