My code which takes me to the button and highlights it (I'm running java scripts within Eclipse)
driver.findElement(By.xpath("//button[contains(text(),'Save')]")).click();
My HTML code
<button data-v-7405e096="" type="button" class="pull-right btn btn-primary">Save</button>
The error
Exception in thread "main" org.openqa.selenium.InvalidSelectorException: invalid selector: Unable to locate an element with the xpath expression //button[contains(text(),'Save')] because of the following error: SyntaxError: Failed to execute 'evaluate' on 'Document': The string '//button[contains(text(),'Save')]' is not a valid XPath expression