NameCriteria criteria =
new NameCriteria("sentenceFormat", L10NStrategy.serverL10N, MatchingStrategy.regex);
UIAElement el = driver.findElement(criteria);
JSONObject log = el.logElementTree(null, true);
Orientation o = Orientation.fromInterfaceOrientation(log.getInt("deviceOrientation"));
Assert.assertEquals(o, Orientation.PORTRAIT);
JSONObject tree = log.getJSONObject("tree");
Assert.assertEquals(tree.getString("type"), "UIAStaticText");
Assert.assertEquals(tree.getString("value"), expected);