I'm was trying to find the following element by xpath:
<input class="t-TextBox" type="email" test-id="test-username"/>
Then I tried:
element = findElement(By.xpath("//[@test-id='test-username']"));
This is the error Expression is not a legal expression.