Winium

  • 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...

    Read More
  • 06
    Jul

    Get display text of label in Winium

    We can interact with Labels in desktop application by using following code: WebElement testElement = winiumdriver.findElement(By.xpath(“//*[contains(@Name,’Keys: ‘)]”)); String lblValue = testElement.getAttribute(“Name”); System.out.println(lblValue);

    Read More
  • 06
    Jul

    Launch desktop application with Winium

    Following code snippet launches desktop application – import java.io.File; import java.io.IOException; import org.openqa.selenium.winium.DesktopOptions; import org.openqa.selenium.winium.WiniumDriver; import org.openqa.selenium.winium.WiniumDriverService; public class LaunchWinium { public static WiniumDriver driver; static String outlookApplicationPath =...

    Read More
  • 06
    Jul

    Switching focus in winium

    In order to switch between two windows / apps (initialized with winium driver), one can switch between two desktop windows by using following code snippet: WebElement nextWindow = winiumdriver.findElementByName(“Window...

    Read More
  • 26
    Jun

    starting a Winium server and test execute sample application

    public class myfirstClass { public static void main(String args) throws IOException, InterruptedException { WiniumDriver driver = null; DesktopOptions options = null; WiniumDriverService service = null; WebDriverWait wait = null;...

    Read More