How to store text from a mayor element using xpath=(//*[text()[contains(.,'x')]])[n]?

This post was flagged by the community and is temporarily hidden.

This is tricky to answer without a website link or at least screenshot.