Explain what does following statement does:
WebElement text = driver.findElement(By.xpath("//*[contains(text(), 'sample')]"));
Above statement defines a variable text of type WebElement and applies the XPath search to initialize it with a reference to an element that contains the text value “sample”.