How to store the content/value of xpath?
Assume xpath as below: xpath : //div[@id='cslGridViewPanelControl']/div/div[2]/div/table/tbody/tr/td[2]/table/tbody/tr/td/table/tbody/tr/td/div Last div element contains 'Displaying 1 to 30 of 145300'. I need to store 'Displaying 1 to 30 of 145300' in some variable by using selenium tool. I tried command target value store xpath variable1 echo ${variable1} It displays as variable1: xpath. But i need variable1: 'Displaying 1 to 30 of 145300'. Can anyone help me please ? Try storeText ( locator, variableName ) Then use it ${variableName} Refer Selenium documentation for storeText saga told you