{"action":"created","issue":{"url":"https://api.github.com/repos/appium/java-client/issues/211","labels_url":"https://api.github.com/repos/appium/java-client/issues/211/labels{/name}","comments_url":"https://api.github.com/repos/appium/java-client/issues/211/comments","events_url":"https://api.github.com/repos/appium/java-client/issues/211/events","html_url":"https://github.com/appium/java-client/issues/211","id":92463855,"number":211,"title":"iOSFindBy & AndroidFindBy annotations are ignored","user":{"login":"justintilson","id":1480031,"avatar_url":"https://avatars.githubusercontent.com/u/1480031?v=3","gravatar_id":"","url":"https://api.github.com/users/justintilson","html_url":"https://github.com/justintilson","followers_url":"https://api.github.com/users/justintilson/followers","following_url":"https://api.github.com/users/justintilson/following{/other_user}","gists_url":"https://api.github.com/users/justintilson/gists{/gist_id}","starred_url":"https://api.github.com/users/justintilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/justintilson/subscriptions","organizations_url":"https://api.github.com/users/justintilson/orgs","repos_url":"https://api.github.com/users/justintilson/repos","events_url":"https://api.github.com/users/justintilson/events{/privacy}","received_events_url":"https://api.github.com/users/justintilson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2015-07-01T19:13:21Z","updated_at":"2015-07-01T22:55:14Z","closed_at":null,"body":"I've been trying for a couple of days to get iOSFindBy & AndroidFindBy annotations working with page objects and the PageFactory. I've tried versions 2.2.0 and 3.0.0 of the java-client and tests for Android and iOS, all with the same result - which is the same as not including any annotations.\r\n\r\nHere is a truncated version of one of my page objects\r\n\r\n```java\r\npublic class HomePhonePage extends BaseHomePage {\r\n\r\n    public HomePhonePage(AppiumDriver driver) {\r\n        super(driver);\r\n\r\n        PageFactory.initElements(new AppiumFieldDecorator(driver,\r\n                        IMPLICIT_WAIT,\r\n                        TimeUnit.SECONDS),\r\n                this\r\n        );\r\n    }\r\n\r\n    @iOSFindBy(accessibility = \"home_landing_my_favorites_count_label\")\r\n    private WebElement myFavoritesCountLabel;\r\n\r\n    public String getMyFavoritesCountLabel() {\r\n        return myFavoritesCountLabel.getText();\r\n    }\r\n}\r\n```\r\n\r\nMy test code:\r\n```java\r\n    @Test\r\n    public void testHomeIsValid() {\r\n\r\n        homePhonePage = new HomePhonePage(driver);\r\n        globalNavPage = new GlobalNavigationPage(driver);\r\n\r\n        homePhonePage.clickHamburgerMenu(); //FAILS HERE because element was not found\r\n        globalNavPage.clickHome();\r\n\r\n    }\r\n```\r\nWhen I debug into PageFactory.initElements, I see [unknown locator] for each property that is a WebElement. Then the PageFactory defaults to looking for each page object's property name as the id or name of the WebElement and fails to find anything.\r\n\r\n![unknown-locator2](https://cloud.githubusercontent.com/assets/1480031/8463051/deb8064c-2005-11e5-8d10-ad79755218ab.png)\r\n\r\nI suspect \"I'm doing it wrong\" but I can't figure out where. It is behaving as if the annotations are not even there.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/appium/java-client/issues/comments/117845185","html_url":"https://github.com/appium/java-client/issues/211#issuecomment-117845185","issue_url":"https://api.github.com/repos/appium/java-client/issues/211","id":117845185,"user":{"login":"TikhomirovSergey","id":4927589,"avatar_url":"https://avatars.githubusercontent.com/u/4927589?v=3","gravatar_id":"","url":"https://api.github.com/users/TikhomirovSergey","html_url":"https://github.com/TikhomirovSergey","followers_url":"https://api.github.com/users/TikhomirovSergey/followers","following_url":"https://api.github.com/users/TikhomirovSergey/following{/other_user}","gists_url":"https://api.github.com/users/TikhomirovSergey/gists{/gist_id}","starred_url":"https://api.github.com/users/TikhomirovSergey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TikhomirovSergey/subscriptions","organizations_url":"https://api.github.com/users/TikhomirovSergey/orgs","repos_url":"https://api.github.com/users/TikhomirovSergey/repos","events_url":"https://api.github.com/users/TikhomirovSergey/events{/privacy}","received_events_url":"https://api.github.com/users/TikhomirovSergey/received_events","type":"User","site_admin":false},"created_at":"2015-07-01T22:55:14Z","updated_at":"2015-07-01T22:55:14Z","body":"Ok. I have two things to say.\r\nThe first is it is my fault that I forgot to improve this:\r\nhttps://github.com/appium/java-client/blob/master/src/main/java/io/appium/java_client/pagefactory/AppiumElementLocator.java#L74\r\nIt is autdated thing from times when there weren't AndroidDriver/IOSFriver (there was only AppiumDriver). I can change it and propese PR soon.\r\n\r\nThe second. If I am right then there is the strange difference between given and printed capabilities. The absence of \"platform\" parameter causes your problem. "}}