SyntaxFix
Write A Post
Hire A Developer
Questions
You should add the tag name in the xpath, like:
element = findElement(By.xpath("//input[@test-id='test-username']");