I\'ve been through the xpath tutorials and checked many other posts, hence I\'m not sure what I\'m missing. I\'m simply trying to find the following element by xpath:
You can use contains too:
element = findElement(By.xpath("//input[contains (@test-id,"test-username")]");