appium / java-client

Java language binding for writing Appium Tests, conforms to W3C WebDriver Protocol
Apache License 2.0
1.21k stars 756 forks source link

Not able to detect className locator in appium 1.6.5 #651

Closed Nishanthshettar closed 6 years ago

Nishanthshettar commented 7 years ago

className strategy is used to locate an element, but with latest upgrade am not able to locate that element.

Environment

name: 'java-client' ,version: '3.0.0' is used in the framework. Appium 1.6.5 *Mac O.S 10.11.6

Details

I put that className in a list and try to access by ther indexes, but in runTime am not able to detect the className. In Appium inspector or Xcode Accesibility, I can find that className but in run time it fails to find.

Code To Reproduce Issue [ Good To Have ]

        int fieldSize = meetingId.size();
        for(int iterator = 0;iterator < fieldSize; iterator++){
            LOGGER.info("Value of Join meeting fields are "+meetingId.get(iterator).getAttribute("value") + "iterator" + iterator);
        }

        System.out.print("@@@@@" + meetingId.get(0));
        waitForMobileElementToBeDisplayed(meetingId.get(0))  // it fails here, not able to detect this

Link to Appium logs

https://gist.github.com/Nishanthshettar/7c2cea78b4a589f9ffb2f455b04da394

TikhomirovSergey commented 7 years ago

Hi @Nishanthshettar v3.0.0 is too old. Could you try it on 5.0.0-BETA8? Also I am suspecting the phe problem could be on the server-side.

Nishanthshettar commented 7 years ago

@TikhomirovSergey thanks for looking in to it, yes I can try Java-Client 5.0.0-BETA8 since appium was converting "UIATextField" to "XCUIElementTypeTextField" to match XCUI type I did not consider upgrading. Still I suspect something to do with server only.

Today I upgraded to Xcode 8.3.2 and ran the same tests on iOS 10.3, same problem continues.

Brad19 commented 7 years ago

Is Accesibility set to true. if not, element won't be visible and you'll not be able to locate it as well.

SrinivasanTarget commented 6 years ago

Closing this as inactive.