In my webpage, there\'s a div with a class named Test.
div
class
Test
How can I find it with XPath?
XPath
XPath has a contains-token function, specifically designed for this situation:
//div[contains-token(@class, 'Test')]
It's only supported in the latest version of XPath (3.1) so you'll need an up-to-date implementation.