Need to change the orientation of app which is dependent on sensor
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 20/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- mobile, testing-qa
Hướng nghiên cứu
Bắt đầu với endpoint định hướng của Appium-Python-Client được hiển thị trong logs, đặc biệt là yêu cầu POST thiết lập LANDSCAPE và lỗi của driver Android. Tái hiện hành vi trên Android emulator và các phiên bản Appium đã nêu, sau đó xác định liệu lỗi thuộc về client hay driver bên dưới. Công việc được xem là hoàn tất khi đã xác định được phạm vi rõ ràng, có thể tái hiện và hành vi định hướng mong đợi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The problem
I have a mobile app which opens in portrait mode and later I need to switch to landscape mode. I have tried all possible solutions but the app does not turn to landscape mode but if I minimize the app , my emulator screen is changed to landscape. My app rotation is dependent on the sensor. How can I handle this using appium with python. I am using Appium-Python-Client 4.0.0.
Environment
- Appium version (or git revision) that exhibits the issue: v1.22.3
- Last Appium version that did not exhibit the issue (if applicable):
- Desktop OS/version used to run Appium: Windows 11
- Node.js version (unless using Appium.app|exe):
- Mobile platform/version under test: Android
- Real device or emulator/simulator: Emulator
- Appium CLI or Appium.app|exe: Appium CLI
Link to Appium Logs
[HTTP] <-- POST /wd/hub/session 200 8341 ms - 1017
[HTTP]
[HTTP] --> GET /wd/hub/session/532110c9-f52f-408a-b2a7-b0a476e3b315/orientation
[HTTP] {}
[W3C (532110c9)] Driver proxy active, passing request on via HTTP proxy
[debug] [WD Proxy] Matched '/wd/hub/session/532110c9-f52f-408a-b2a7-b0a476e3b315/orientation' to command name 'getOrientation'
[debug] [WD Proxy] Proxying [GET /wd/hub/session/532110c9-f52f-408a-b2a7-b0a476e3b315/orientation] to [GET http://127.0.0.1:8203/wd/hub/session/cf21f8fe-7a33-44b8-94ad-1b8b62efc047/orientation] with no body
[debug] [WD Proxy] Got response with status 200: {"sessionId":"cf21f8fe-7a33-44b8-94ad-1b8b62efc047","value":"PORTRAIT"}
[WD Proxy] Replacing sessionId cf21f8fe-7a33-44b8-94ad-1b8b62efc047 with 532110c9-f52f-408a-b2a7-b0a476e3b315
[HTTP] <-- GET /wd/hub/session/532110c9-f52f-408a-b2a7-b0a476e3b315/orientation 200 1378 ms - 71
[HTTP]
[HTTP] --> GET /wd/hub/session/532110c9-f52f-408a-b2a7-b0a476e3b315/orientation
[HTTP] {}
[W3C (532110c9)] Driver proxy active, passing request on via HTTP proxy
[debug] [WD Proxy] Matched '/wd/hub/session/532110c9-f52f-408a-b2a7-b0a476e3b315/orientation' to command name 'getOrientation'
[debug] [WD Proxy] Proxying [GET /wd/hub/session/532110c9-f52f-408a-b2a7-b0a476e3b315/orientation] to [GET http://127.0.0.1:8203/wd/hub/session/cf21f8fe-7a33-44b8-94ad-1b8b62efc047/orientation] with no body
[debug] [WD Proxy] Got response with status 200: {"sessionId":"cf21f8fe-7a33-44b8-94ad-1b8b62efc047","value":"PORTRAIT"}
[WD Proxy] Replacing sessionId cf21f8fe-7a33-44b8-94ad-1b8b62efc047 with 532110c9-f52f-408a-b2a7-b0a476e3b315
[HTTP] <-- GET /wd/hub/session/532110c9-f52f-408a-b2a7-b0a476e3b315/orientation 200 19 ms - 71
[HTTP]
[HTTP] --> POST /wd/hub/session/532110c9-f52f-408a-b2a7-b0a476e3b315/orientation
[HTTP] {"orientation":"LANDSCAPE"}
[W3C (532110c9)] Driver proxy active, passing request on via HTTP proxy
[debug] [WD Proxy] Matched '/wd/hub/session/532110c9-f52f-408a-b2a7-b0a476e3b315/orientation' to command name 'setOrientation'
[debug] [WD Proxy] Proxying [POST /wd/hub/session/532110c9-f52f-408a-b2a7-b0a476e3b315/orientation] to [POST http://127.0.0.1:8203/wd/hub/session/cf21f8fe-7a33-44b8-94ad-1b8b62efc047/orientation] with body: {"orientation":"LANDSCAPE"}
[WD Proxy] Got response with status 400: {"sessionId":"cf21f8fe-7a33-44b8-94ad-1b8b62efc047","value":{"error":"invalid element state","message":"Screen rotation cannot be changed to ROTATION_270 after 2000ms. Is it locked programmatically?","stacktrace":"io.appium.uiautomator2.common.exceptions.InvalidElementStateException: Screen rotation cannot be changed to ROTATION_270 after 2000ms. Is it locked programmatically?\n\tat io.appium.uiautomator2.model.internal.CustomUiDevice.setRotationSync(CustomUiDevice.java:184)\n\tat io.appium.uiautomator2.handler.SetOrientation.safeHandle(SetOrientation.java:41)\n\tat io.appium.uiautomator2.handler.request.SafeRequestHandler.handle(SafeRequestHandler.java:59)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleRequest(AppiumServlet.java:266)\n\tat io.appium.uiautomator2.server.AppiumServlet.handleHttpRequest(AppiumServlet.java:260)\n\tat io.appium.uiautomator2.http.ServerHandler.channelRead(ServerHandler.java:68)\n\tat io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandle...
[debug] [W3C] Matched W3C error code 'invalid element state' to InvalidElementStateError
[HTTP] <-- POST /wd/hub/session/532110c9-f52f-408a-b2a7-b0a476e3b315/orientation 400 2068 ms - 3926
Code To reproduce issue
- Ngôn ngữ chính
- Python
- Star
- 1.8k
- Fork
- 570
- Merge trung bình
- 1 ngày 10 giờ
- Pull request đã merge (30 ngày)
- 24
Chuẩn bị môi trường
Chúng tôi chưa kiểm tra các tệp thiết lập môi trường của dự án này. Hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của appium/python-client
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
appium/python-client#1230 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
question
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
appium/python-client#1168 · 9 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
appium/python-client#1147 · 7 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 38/100
appium/python-client#1091 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
appium/python-client#1076 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của appium/python-client
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
gradio-app/gradio#13895 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
build-error
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
spack/spack-packages#6713 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Use issue templatesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
ActivityWatch/activitywatch#1464 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Bug]: The ckg tool drops the return type of every decorated Python method in class search resultsĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
bytedance/trae-agent#483 ·
Maintainer thường phản hồi trong vòng 1 ngày