{"action":"opened","issue":{"url":"https://api.github.com/repos/appium/python-client/issues/220","repository_url":"https://api.github.com/repos/appium/python-client","labels_url":"https://api.github.com/repos/appium/python-client/issues/220/labels{/name}","comments_url":"https://api.github.com/repos/appium/python-client/issues/220/comments","events_url":"https://api.github.com/repos/appium/python-client/issues/220/events","html_url":"https://github.com/appium/python-client/issues/220","id":326944927,"number":220,"title":"click received on other elements.","user":{"login":"bhishan","id":6163574,"avatar_url":"https://avatars0.githubusercontent.com/u/6163574?v=4","gravatar_id":"","url":"https://api.github.com/users/bhishan","html_url":"https://github.com/bhishan","followers_url":"https://api.github.com/users/bhishan/followers","following_url":"https://api.github.com/users/bhishan/following{/other_user}","gists_url":"https://api.github.com/users/bhishan/gists{/gist_id}","starred_url":"https://api.github.com/users/bhishan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhishan/subscriptions","organizations_url":"https://api.github.com/users/bhishan/orgs","repos_url":"https://api.github.com/users/bhishan/repos","events_url":"https://api.github.com/users/bhishan/events{/privacy}","received_events_url":"https://api.github.com/users/bhishan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-28T08:38:57Z","updated_at":"2018-05-28T08:38:57Z","closed_at":null,"author_association":"NONE","body":"Hi, \r\nI am experiencing a scenario which I think is incorrect in terms of how it were intended to be. \r\nScenario: \r\n\r\n1.  Find click-ables through `clickables = driver.find_elements_by_android_uiautomator('new UiSelector().clickable(true)')`\r\n2.  Navigate through the first(arbitrary) clickables found. `clickables[0].click()`\r\n3. On the next activity or view reached from the navigation of the second step, using the reference to the same set of clickables(without performing find_elements), the click can be performed and hence is received by a different element. `clickables[0].click() #was expecting exception of some sort since the element is not present. the click is performed on some other element in the current activity. Is this a normal scenario?`\r\n\r\nTested on:\r\n```\r\nAppium version: 1.7.2\r\nAppium-Python-Client version: 0.26\r\nAPK used: Udemy's Android Application # I believe this can be replicated in any other applications too.\r\n```\r\nBelow is a code snippet to replicate the scenario. \r\n```from appium import webdriver\r\nimport time\r\n\r\n\r\ndef make_navigation_driver(apk_path, package_name, initial_activity, platform='Android', platform_version='8.1.0', device_id='emulator-5554', server_api='http://localhost:4723/wd/hub', **kwargs):\r\n    \"\"\"\r\n    :param apk_path:\r\n    :param package_name:\r\n    :param initial_activity:\r\n    :param platform:\r\n    :param platform_version:\r\n    :param device_id:\r\n    :param server_api:\r\n    :param kwargs: Probably will use for setting custom timeout and other capabilities. Implement later?\r\n    :return:\r\n    \"\"\"\r\n    desired_caps = {\r\n        'platformName': platform,\r\n        'platformVersion': platform_version,\r\n        'deviceName': device_id,\r\n        # 'app': apk_path, # Saving apk travel time to device since it is already installed on the device.\r\n        'appPackage': package_name,\r\n        'appActivity': initial_activity\r\n    }\r\n\r\n    return webdriver.Remote(server_api, desired_caps)\r\n\r\n\r\ndef perform_issue_scenario(driver):\r\n    \"\"\"\r\n    :param driver:\r\n    :return:\r\n    \"\"\"\r\n    clickables = driver.find_elements_by_android_uiautomator('new UiSelector().clickable(true)')\r\n\r\n    # navigate to next activity via clicking on the first clickable.\r\n    clickables[0].click()\r\n\r\n    # some safety time sleep for navigating to the next activity and for content to load.\r\n    time.sleep(10)\r\n\r\n    # although the clickable isn't present in the current activity, the click is performed on some other element.\r\n    clickables[0].click() # was expecting exception of some sort since the element is not present.\r\n    # the click is performed on some other element in the current activity. Is this a normal scenario?\r\n\r\n\r\n\r\nif __name__ == '__main__':\r\n    platform = \"Android\"\r\n    platform_version = \"7.1.1\"\r\n    # platform_version = \"8.1.0\"\r\n    device_id = \"367e7aa0\"\r\n    # device_id = \"emulator-5554\"\r\n    # apk_path = \"/Users/bhishan/Downloads/Facebook_v170.0.0.52.95_apkpure.com.apk\"\r\n    apk_path = \"/Users/bhishan/Downloads/udemy.apk\"\r\n    # package_name = \"com.facebook.katana\"\r\n    package_name = \"com.udemy.android\"\r\n    initial_activity = \".SplashActivity\"\r\n\r\n    driver = make_navigation_driver(apk_path, package_name, initial_activity, platform=platform,\r\n                                    platform_version=platform_version, device_id=device_id)\r\n\r\n    perform_issue_scenario(driver)\r\n```\r\n"}}
{"actor":{"display_login":"bhishan"}}