Title: push a zip file to my Android device in Appium · Issue #268 · appium/python-client · GitHub
Open Graph Title: push a zip file to my Android device in Appium · Issue #268 · appium/python-client
X Title: push a zip file to my Android device in Appium · Issue #268 · appium/python-client
Description: The problem is there any way that pushing a zip file to my Android device? When using push_file() I found that it can push file such as text, but except zip file. I use python to write my scripts. Environment Appium version (or git revis...
Open Graph Description: The problem is there any way that pushing a zip file to my Android device? When using push_file() I found that it can push file such as text, but except zip file. I use python to write my scripts. ...
X Description: The problem is there any way that pushing a zip file to my Android device? When using push_file() I found that it can push file such as text, but except zip file. I use python to write my scripts. ...
Opengraph URL: https://github.com/appium/python-client/issues/268
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"push a zip file to my Android device in Appium","articleBody":"## The problem\r\n\r\nis there any way that pushing a zip file to my Android device? When using push_file() I found that it can push file such as text, but except zip file. I use python to write my scripts.\r\n## Environment\r\n\r\n* Appium version (or git revision) that exhibits the issue: 1.9.0\r\n* Desktop OS/version used to run Appium: Ubuntu 18.04\r\n* Node.js version (unless using Appium.app|exe): v8.12.0\r\n* Mobile platform/version under test: Android 5.0\r\n\r\n## This is my code:\r\n```\r\ntry:\r\ndriver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', desired_caps)\r\nexcept Exception as e:\r\nprint((\"WebDriverException Error : \", e))\r\n\r\nwith open('E:\\\\myupdate_318.zip', 'rb') as zip_file:\r\n data = zip_file.read()\r\ndriver.push_file('/storage/sdcard1/myupdate.zip', data.encode('base64'))\r\nzip_file.close() \r\n```\r\n## This is server log:\r\n```\r\nTraceback (most recent call last): File \"/home/user/Project/Appium/AutoInstallSoftWare/AutoInstallSoftWare.py\", line 30, in test_unintall_old_package self.driver.push_file('/storage/sdcard1/myupdate.zip', data.encode('base64')) AttributeError: 'bytes' object has no attribute 'encode'\r\n```\r\nWhat should I do?","author":{"url":"https://github.com/Ucoon","@type":"Person","name":"Ucoon"},"datePublished":"2018-11-01T08:48:31.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":12},"url":"https://github.com/268/python-client/issues/268"}
| 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:452af59a-a73b-95b3-0f4c-11a3d9828006 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B20C:171CBE:1B32D0A:25AA6BB:6A5F3320 |
| html-safe-nonce | faf534e3660c45eb5544fc3aa22a1efde5dd9e2a72708390a5b12e40757c4a0c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMjBDOjE3MUNCRToxQjMyRDBBOjI1QUE2QkI6NkE1RjMzMjAiLCJ2aXNpdG9yX2lkIjoiNDUzNzgxOTMxMjkzNDU2NDY0MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | bbed3a41f7eb902dfdf5fc15a66a4a2a4825dc893ad30640c60e4a9f2c3d26b3 |
| hovercard-subject-tag | issue:376304028 |
| 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/268/issue_layout |
| twitter:image | https://opengraph.githubassets.com/bdd24f9743354a85e10b37cb88982dfebf691de7da90102b7f8f0984c121a144/appium/python-client/issues/268 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/bdd24f9743354a85e10b37cb88982dfebf691de7da90102b7f8f0984c121a144/appium/python-client/issues/268 |
| og:image:alt | The problem is there any way that pushing a zip file to my Android device? When using push_file() I found that it can push file such as text, but except zip file. I use python to write my scripts. ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Ucoon |
| hostname | github.com |
| expected-hostname | github.com |
| None | c80a2cb0221395c7c3987d7891fcde45641e27ea0bd3917b247d8fe154cf710f |
| 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 | 4cf24abec96dc3a7b39f364f737aca1e50991904 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width