use of com.github.noraui.application.model.logogame.Logo in project NoraUi by NoraUi.
the class LogoGameSteps method playWithMyInputFile.
@Alors("Je joue avec mon fichier d'entrée '(.*)'")
@Then("I play with my input file '(.*)'")
public void playWithMyInputFile(String jsonLogos) throws TechnicalException {
Logos logos = new Logos();
logos.deserialize(jsonLogos);
for (int i = 0; i < logos.size(); i++) {
Logo logo = logos.get(i);
logo.setNid(i);
try {
WebElement element = getDriver().findElement(Utilities.getLocator(this.logoGamePage.brandElement, logo.getBrand(), logo.getBrand()));
if (element != null) {
updateText(this.logoGamePage.brandElement, logo.getBrand(), null, logo.getBrand(), logo.getBrand());
}
} catch (Exception e) {
new Result.Warning<>(logo.getBrand(), Messages.format("Brand « %s » does not exist.", logo.getBrand()), true, logo.getNid());
}
}
}
Aggregations