return getDictionary(AppleLanguage.valueOf(languageCode));
}
public LanguageDictionary getDictionary(AppleLanguage language) throws WebDriverException {
if (!language.exists()) {
throw new WebDriverException("The application doesn't have any content files.The l10n "
+ "features cannot be used.");
}
for (LanguageDictionary dict : dictionaries) {
if (dict.getLanguage() == language) {
return dict;
}
}
throw new WebDriverException("Cannot find dictionary for " + language);
}