Title: I'm not able to perform an easy task · Issue #597 · appium/python-client · GitHub
Open Graph Title: I'm not able to perform an easy task · Issue #597 · appium/python-client
X Title: I'm not able to perform an easy task · Issue #597 · appium/python-client
Description: Hello, I just started using Appium under windows, with uiautomator2. I'm trying to do a little click on an element, nothing else: els1 = driver.find_elements(By.ID, "com.instagram.android:id/tab_avatar") this is where it crashes which is...
Open Graph Description: Hello, I just started using Appium under windows, with uiautomator2. I'm trying to do a little click on an element, nothing else: els1 = driver.find_elements(By.ID, "com.instagram.android:id/tab_av...
X Description: Hello, I just started using Appium under windows, with uiautomator2. I'm trying to do a little click on an element, nothing else: els1 = driver.find_elements(By.ID, "com.instagram.android:...
Opengraph URL: https://github.com/appium/python-client/issues/597
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"I'm not able to perform an easy task","articleBody":"Hello, I just started using Appium under windows, with uiautomator2. I'm trying to do a little click on an element, nothing else:\r\n`els1 = driver.find_elements(By.ID, \"com.instagram.android:id/tab_avatar\")` this is where it crashes\r\nwhich is the same as `els1 = driver.find_elements_by_id(\"com.instagram.android:id/tab_avatar\")` as suggested by Appium, but deprecated..\r\n\r\nThis is the full code:\r\n\r\n```\r\nfrom appium import webdriver\r\nfrom selenium.webdriver.common.by import By\r\n\r\ndesired_caps = {\r\n \"platformName\": \"Android\",\r\n \"automationName\": \"UiAutomator2\",\r\n \"deviceName\": \"emulator-5554\",\r\n \"appPackage\": \"com.instagram.android\",\r\n \"appActivity\": \"com.instagram.mainactivity.MainActivity\",\r\n \"noReset\": True,\r\n \"fullReset\": False,\r\n \"newCommandTimeout\": 120\r\n}\r\ndriver = webdriver.Remote(\"http://localhost:4723/wd/hub\", desired_caps)\r\nels1 = driver.find_elements(By.ID, \"com.instagram.android:id/tab_avatar\")\r\nels1[0].click()\r\ndriver.quit()\r\n```\r\nThis is what I get:\r\n\r\n\u003e Traceback (most recent call last):\r\n\u003e File \"c:\\users\\dedil\\appdata\\local\\programs\\python\\python37\\lib\\runpy.py\", line 193, in _run_module_as_main\r\n\u003e \"__main__\", mod_spec)\r\n\u003e File \"c:\\users\\dedil\\appdata\\local\\programs\\python\\python37\\lib\\runpy.py\", line 85, in _run_code\r\n\u003e exec(code, run_globals)\r\n\u003e File \"c:\\Users\\dedil\\.vscode\\extensions\\ms-python.python-2021.3.680753044\\pythonFiles\\lib\\python\\debugpy\\__main__.py\", line 45, in \u003cmodule\u003e\r\n\u003e cli.main()\r\n\u003e File \"c:\\Users\\dedil\\.vscode\\extensions\\ms-python.python-2021.3.680753044\\pythonFiles\\lib\\python\\debugpy/..\\debugpy\\server\\cli.py\", line 444, in main\r\n\u003e run()\r\n\u003e File \"c:\\Users\\dedil\\.vscode\\extensions\\ms-python.python-2021.3.680753044\\pythonFiles\\lib\\python\\debugpy/..\\debugpy\\server\\cli.py\", line 285, in run_file\r\n\u003e runpy.run_path(target_as_str, run_name=compat.force_str(\"__main__\"))\r\n\u003e File \"c:\\users\\dedil\\appdata\\local\\programs\\python\\python37\\lib\\runpy.py\", line 263, in run_path\r\n\u003e pkg_name=pkg_name, script_name=fname)\r\n\u003e File \"c:\\users\\dedil\\appdata\\local\\programs\\python\\python37\\lib\\runpy.py\", line 96, in _run_module_code\r\n\u003e mod_name, mod_spec, pkg_name, script_name)\r\n\u003e File \"c:\\users\\dedil\\appdata\\local\\programs\\python\\python37\\lib\\runpy.py\", line 85, in _run_code\r\n\u003e exec(code, run_globals)\r\n\u003e File \"c:\\Users\\dedil\\OneDrive\\Documents\\GitHub\\bot\\GramAddict\\core\\test.py\", line 32, in \u003cmodule\u003e\r\n\u003e els1 = driver.find_elements(By.ID, \"com.instagram.android:id/tab_avatar\")\r\n\u003e File \"c:\\Users\\dedil\\OneDrive\\Documents\\GitHub\\bot\\.venv\\lib\\site-packages\\appium\\webdriver\\webdriver.py\", line 308, in find_elements \r\n\u003e return self.execute(RemoteCommand.FIND_ELEMENTS, {'using': by, 'value': value})['value'] or []\r\n\u003e File \"c:\\Users\\dedil\\OneDrive\\Documents\\GitHub\\bot\\.venv\\lib\\site-packages\\selenium\\webdriver\\remote\\webdriver.py\", line 371, in execute \r\n\u003e response.get('value', None))\r\n\u003e File \"c:\\Users\\dedil\\OneDrive\\Documents\\GitHub\\bot\\.venv\\lib\\site-packages\\selenium\\webdriver\\remote\\webdriver.py\", line 345, in _unwrap_value\r\n\u003e return list(self._unwrap_value(item) for item in value)\r\n\u003e File \"c:\\Users\\dedil\\OneDrive\\Documents\\GitHub\\bot\\.venv\\lib\\site-packages\\selenium\\webdriver\\remote\\webdriver.py\", line 345, in \u003cgenexpr\u003e \r\n\u003e return list(self._unwrap_value(item) for item in value)\r\n\u003e File \"c:\\Users\\dedil\\OneDrive\\Documents\\GitHub\\bot\\.venv\\lib\\site-packages\\selenium\\webdriver\\remote\\webdriver.py\", line 339, in _unwrap_value\r\n\u003e return self.create_web_element(value['element-6066-11e4-a52e-4f735466cecf'])\r\n\u003e File \"c:\\Users\\dedil\\OneDrive\\Documents\\GitHub\\bot\\.venv\\lib\\site-packages\\appium\\webdriver\\webdriver.py\", line 323, in create_web_element \r\n\u003e return MobileWebElement(self, element_id, w3c)\r\n\u003e **TypeError: __init__() takes 3 positional arguments but 4 were given**\r\n","author":{"url":"https://github.com/mastrolube","@type":"Person","name":"mastrolube"},"datePublished":"2021-04-01T23:06:08.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/597/python-client/issues/597"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:0a6cdd5a-641c-85c6-4341-9261f214a65b |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8CC2:1D1BFA:6A6A330:909C219:6A5E2565 |
| html-safe-nonce | 9c96e83d0f6ffceedf9d588e89c8ce85659202ce317d59580ae2a3f956d72efc |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4Q0MyOjFEMUJGQTo2QTZBMzMwOjkwOUMyMTk6NkE1RTI1NjUiLCJ2aXNpdG9yX2lkIjoiNTQxNzIwNzI2MTEzMDc5NDM0MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 94c37d5eabfaedda2bdf46d4eed22ad7246f1fbe4a8e7f1aef8f71b8376b2aa7 |
| hovercard-subject-tag | issue:848849088 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/appium/python-client/597/issue_layout |
| twitter:image | https://opengraph.githubassets.com/daaaace34a23ea8129be6c76a72279647dd318632a7d7c5beb2238b0e7381393/appium/python-client/issues/597 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/daaaace34a23ea8129be6c76a72279647dd318632a7d7c5beb2238b0e7381393/appium/python-client/issues/597 |
| og:image:alt | Hello, I just started using Appium under windows, with uiautomator2. I'm trying to do a little click on an element, nothing else: els1 = driver.find_elements(By.ID, "com.instagram.android:id/tab_av... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mastrolube |
| hostname | github.com |
| expected-hostname | github.com |
| None | e5010f4d2748a3cbef86e1580413ff14701bd99f255268dfb4a2857c77e2cc7c |
| turbo-cache-control | no-preview |
| go-import | github.com/appium/python-client git https://github.com/appium/python-client.git |
| octolytics-dimension-user_id | 3221291 |
| octolytics-dimension-user_login | appium |
| octolytics-dimension-repository_id | 18525395 |
| octolytics-dimension-repository_nwo | appium/python-client |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 18525395 |
| octolytics-dimension-repository_network_root_nwo | appium/python-client |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7d23604c4a8ce0274b4c71bb2adbe6e1c9d5904f |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width