@Test(dataProvider = "intlMountain")
public void selectAndValidateServerSideL10NedContent(String lang, String expectedContent) {
driver = new RemoteIOSDriver(getRemoteURL(), SampleApps.intlMountainsCap(lang));
Criteria c1 = new TypeCriteria(UIATableCell.class);
UIAElement element = driver.findElement(c1);
element.tap();
NameCriteria
criteria =
new NameCriteria("sentenceFormat", L10NStrategy.serverL10N, MatchingStrategy.regex);
UIAElement text = driver.findElement(criteria);
String actual = text.getName();
Assert.assertEquals(actual, expectedContent);
criteria =
new NameCriteria("meterFormat", L10NStrategy.serverL10N, MatchingStrategy.contains);
text = driver.findElement(criteria);
actual = text.getName();
Assert.assertEquals(actual, expectedContent);
// and using Xpath
WebElement el = driver.findElement(By.xpath("//*[matches(@name,l10n('meterFormat'))]"));