{"action":"created","issue":{"url":"https://api.github.com/repos/appium/appium/issues/8664","repository_url":"https://api.github.com/repos/appium/appium","labels_url":"https://api.github.com/repos/appium/appium/issues/8664/labels{/name}","comments_url":"https://api.github.com/repos/appium/appium/issues/8664/comments","events_url":"https://api.github.com/repos/appium/appium/issues/8664/events","html_url":"https://github.com/appium/appium/issues/8664","id":235647101,"number":8664,"title":"In listview, isDisplayed() and isSelected() return incorrect value","user":{"login":"maesiva","id":23131948,"avatar_url":"https://avatars3.githubusercontent.com/u/23131948?v=4","gravatar_id":"","url":"https://api.github.com/users/maesiva","html_url":"https://github.com/maesiva","followers_url":"https://api.github.com/users/maesiva/followers","following_url":"https://api.github.com/users/maesiva/following{/other_user}","gists_url":"https://api.github.com/users/maesiva/gists{/gist_id}","starred_url":"https://api.github.com/users/maesiva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maesiva/subscriptions","organizations_url":"https://api.github.com/users/maesiva/orgs","repos_url":"https://api.github.com/users/maesiva/repos","events_url":"https://api.github.com/users/maesiva/events{/privacy}","received_events_url":"https://api.github.com/users/maesiva/received_events","type":"User","site_admin":false},"labels":[{"id":34328464,"url":"https://api.github.com/repos/appium/appium/labels/Android","name":"Android","color":"ADFF2F","default":false},{"id":24368806,"url":"https://api.github.com/repos/appium/appium/labels/Bug","name":"Bug","color":"fc2929","default":false},{"id":647299879,"url":"https://api.github.com/repos/appium/appium/labels/P1","name":"P1","color":"e99695","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":14,"created_at":"2017-06-13T18:29:43Z","updated_at":"2017-12-20T13:07:44Z","closed_at":null,"author_association":"NONE","body":"## The problem\r\n\r\nIn a scrollable List View, for an element that is not currently on the screen, isDisplayed() returns true.\r\nFor all the elements that are available in the list, isDisplayed() returns true.\r\n\r\nAnd, isSelected() always returns false, even if the element is selected.\r\n\r\n\r\n## Environment\r\n\r\n* Appium version (or git revision) that exhibits the issue: 1.6.5\r\n* Desktop OS/version used to run Appium: Windows 7\r\n* Node.js version (unless using Appium.app|exe): v6.3.0\r\n* Mobile platform/version under test: Android 6.0.1\r\n* Real device or emulator/simulator: Samsung Galaxy Tab S2\r\n* Appium CLI or Appium.app|exe: appium 1.6.5 via command mode\r\n* App: Cordova based hybrid app, release version (without webview) and on native view.\r\n\r\n## Details\r\n\r\nisDisplayed() should return false when the element is currently not on screen.\r\nisSelected() should return true when the element is selected in the list.\r\n\r\n## Code To Reproduce Issue [ Good To Have ]\r\n\r\n\tString item01_xp = \"//android.view.View[@content-desc='Item_01']\";\r\n\tString item25_xp = \"//android.view.View[@content-desc='Item_25']\";\r\n\tWebElement e1 = driver.findElement(By.xpath(item01_xp)); //item is visible on screen and seleted\r\n\tWebElement e2 = driver.findElement(By.xpath(item25_xp)); // item is not visible on screen. its down in the scroll list.\r\n\r\n\tSystem.out.println(\"isDisplayed()\" + e1.isDisplayed());\r\n\tSystem.out.println(\"isSelected()\" + e1.isSelected());\r\n\r\n\tSystem.out.println(\"isDisplayed()\" + e2.isDisplayed());\r\n\tSystem.out.println(\"isSelected()\" + e2.isSelected());\r\n\r\n>> actual output:\r\ntrue\r\nfalse\r\ntrue\r\nfalse\r\n\r\n>> expected output:\r\ntrue\r\ntrue\r\nfalse\r\nfalse"},"comment":{"url":"https://api.github.com/repos/appium/appium/issues/comments/353058496","html_url":"https://github.com/appium/appium/issues/8664#issuecomment-353058496","issue_url":"https://api.github.com/repos/appium/appium/issues/8664","id":353058496,"user":{"login":"lanzelot1989","id":773651,"avatar_url":"https://avatars1.githubusercontent.com/u/773651?v=4","gravatar_id":"","url":"https://api.github.com/users/lanzelot1989","html_url":"https://github.com/lanzelot1989","followers_url":"https://api.github.com/users/lanzelot1989/followers","following_url":"https://api.github.com/users/lanzelot1989/following{/other_user}","gists_url":"https://api.github.com/users/lanzelot1989/gists{/gist_id}","starred_url":"https://api.github.com/users/lanzelot1989/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lanzelot1989/subscriptions","organizations_url":"https://api.github.com/users/lanzelot1989/orgs","repos_url":"https://api.github.com/users/lanzelot1989/repos","events_url":"https://api.github.com/users/lanzelot1989/events{/privacy}","received_events_url":"https://api.github.com/users/lanzelot1989/received_events","type":"User","site_admin":false},"created_at":"2017-12-20T13:07:44Z","updated_at":"2017-12-20T13:07:44Z","author_association":"NONE","body":"We have the same problem where a new view is stacked on top of another one when navigating away from it."}}
{"actor":{"display_login":"lanzelot1989"}}