Thursday, 22 September 2016

Helper methods Appium 1.6.0 Beta

  // iOS        // Find element in table cell         driver.findElementByXPath("//XCUIElementTypeCell/XCUIElementTypeStaticText[@name='some-id']"));

        //   Print source of screen visible        System.out.println(driver.getPageSource());

        //default timeout for all commands executed using this driver. can be overridden using explicit wait        driver.manage().timeouts().implicitlyWait(3, TimeUnit.SECONDS);

        //EXPLICIT wait for element for x seconds        //  If explicit wait > implicit wait , then greater driver will default to greater wait period        int seconds= 3;
        WebDriverWait wait = new WebDriverWait(driver, seconds);

//        UIAutomation(IOS)//        Find visibility of element using XPath        xpath = "UIATableCell/UIAStaticText[@label='Family'][@visible='true']";

        click on first table cell (xpath may change based on your application)

No comments:

Post a Comment