06
Jul

XPath in Winium

Following code snippet demonstrates how to use XPath with Winium driver.

WebElement testElement = winiumdriver.findElement(By.xpath(“//*[contains(@Name,’Keys: ‘)]”));
String lblValue = testElement.getAttribute(“Name”);
System.out.println(lblValue);

Unfortunately Winium driver do not support CSS elements identification