L'ajout de variable Java pour xpath

Est-il possible d'ajouter un sens Java variable de Chaîne à un xpath-expression? Voici un code pour le rendre clair:

String newUser = "NewUser123";
driver.findElement(By.xpath("//td[normalize-space(text())=**newUser**]/a")).click();

Xpath devrait travailler avec la variable newUser, mais je ne sais pas comment.

InformationsquelleAutor Stefan | 2015-10-18