zebrunner / stf

Mirror for git@github.com:openstf/stf.git repository
Other
30 stars 18 forks source link

Mobile: The landscape icon switches to portrait when the screen position is changed #996

Open dhreben opened 2 weeks ago

dhreben commented 2 weeks ago

Steps:

  1. Open STF on mobile device
  2. Open iOS
  3. Open any website e.g google.com and click on "landscape icon"

Actual result: The landscape icon switches to portrait when the screen position is changed Linked https://github.com/zebrunner/stf/issues/892

https://github.com/user-attachments/assets/80f3e8a7-57d9-4791-9fe5-c548ecc79fbb

logs:

2024-08-28T10:32:41.884Z INF/wdaClient 48 [b09fa26acc4c3f777e9b8b49e3348b7243f862b5] getting device window size...
2024-08-28T10:32:41.887Z INF/wdaClient 48 [b09fa26acc4c3f777e9b8b49e3348b7243f862b5] Reusing device size/scale
2024-08-28T10:32:41.926Z VRB/wdaClient 48 [b09fa26acc4c3f777e9b8b49e3348b7243f862b5] Request has been sent to WDA with data:  {"method":"GET","uri":"http://connector:8100/session/AF06CB48-B596-4C7F-9C2E-2560A551B887/orientation","json":true}
2024-08-28T10:32:41.932Z INF/wdaClient 48 [b09fa26acc4c3f777e9b8b49e3348b7243f862b5] Current device orientation: PORTRAIT
2024-08-28T10:32:41.934Z VRB/wdaClient 48 [b09fa26acc4c3f777e9b8b49e3348b7243f862b5] Request has been sent to WDA with data:  {"method":"GET","uri":"http://connector:8100/session/AF06CB48-B596-4C7F-9C2E-2560A551B887/wda/batteryInfo","json":true}
2024-08-28T10:32:41.938Z INF/wdaClient 48 [b09fa26acc4c3f777e9b8b49e3348b7243f862b5] Setting new device battery info
2024-08-28T10:32:44.594Z VRB/wdaClient 48 [b09fa26acc4c3f777e9b8b49e3348b7243f862b5] Request has been sent to WDA with data:  {"method":"POST","uri":"http://connector:8100/session/AF06CB48-B596-4C7F-9C2E-2560A551B887/orientation","body":{"orientation":"LANDSCAPE"},"json":true}
2024-08-28T10:32:44.617Z VRB/wdaClient 48 [b09fa26acc4c3f777e9b8b49e3348b7243f862b5] Request has been sent to WDA with data:  {"method":"GET","uri":"http://connector:8100/session/AF06CB48-B596-4C7F-9C2E-2560A551B887/orientation","json":true}
2024-08-28T10:32:44.618Z INF/wdaClient 48 [b09fa26acc4c3f777e9b8b49e3348b7243f862b5] Current device orientation: LANDSCAPE
2024-08-28T10:32:48.432Z VRB/wdaClient 48 [b09fa26acc4c3f777e9b8b49e3348b7243f862b5] Request has been sent to WDA with data:  {"method":"POST","uri":"http://connector:8100/session/AF06CB48-B596-4C7F-9C2E-2560A551B887/orientation","body":{"orientation":"PORTRAIT"},"json":true}
2024-08-28T10:32:48.467Z VRB/wdaClient 48 [b09fa26acc4c3f777e9b8b49e3348b7243f862b5] Request has been sent to WDA with data:  {"method":"GET","uri":"http://connector:8100/session/AF06CB48-B596-4C7F-9C2E-2560A551B887/orientation","json":true}
2024-08-28T10:32:48.469Z INF/wdaClient 48 [b09fa26acc4c3f777e9b8b49e3348b7243f862b5] Current device orientation: PORTRAIT
2024-08-28T10:32:53.423Z VRB/wdaClient 48 [b09fa26acc4c3f777e9b8b49e3348b7243f862b5] Request has been sent to WDA with data:  {"method":"POST","uri":"http://connector:8100/session/AF06CB48-B596-4C7F-9C2E-2560A551B887/orientation","body":{"orientation":"LANDSCAPE"},"json":true}
2024-08-28T10:32:53.461Z VRB/wdaClient 48 [b09fa26acc4c3f777e9b8b49e3348b7243f862b5] Request has been sent to WDA with data:  {"method":"GET","uri":"http://connector:8100/session/AF06CB48-B596-4C7F-9C2E-2560A551B887/orientation","json":true}
2024-08-28T10:32:53.464Z INF/wdaClient 48 [b09fa26acc4c3f777e9b8b49e3348b7243f862b5] Current device orientation: LANDSCAPE
2024-08-28T10:33:02.868Z VRB/wdaClient 48 [b09fa26acc4c3f777e9b8b49e3348b7243f862b5] Request has been sent to WDA with data:  {"method":"POST","uri":"http://connector:8100/session/AF06CB48-B596-4C7F-9C2E-2560A551B887/orientation","body":{"orientation":"PORTRAIT"},"json":true}
2024-08-28T10:33:02.900Z VRB/wdaClient 48 [b09fa26acc4c3f777e9b8b49e3348b7243f862b5] Request has been sent to WDA with data:  {"method":"GET","uri":"http://connector:8100/session/AF06CB48-B596-4C7F-9C2E-2560A551B887/orientation","json":true}
2024-08-28T10:33:02.904Z INF/wdaClient 48 [b09fa26acc4c3f777e9b8b49e3348b7243f862b5] Current device orientation: PORTRAIT
dhreben commented 2 weeks ago

implemented for testing:

dhreben commented 2 weeks ago

Reopened Steps:

  1. Open iOS or Android device
  2. Open Chrome browser -> android, Safari browser-> iPhone
  3. Click Landscape button -> screen is turned to landscape mode
  4. Click Portrait button-> screen is not turned to portrait mode -> Landscape and portrait buttons are active

photo_2024-08-30_19-15-40 photo_2024-08-30_19-10-36

Tested: iPhone 13_Pro_Max - Safari and Chrome browsers Samsung S21 - Chrome browser

Logs:

2024-08-30T16:02:18.631Z INF/device:plugins:screen:stream 48 [FA7371702902] Stopping minicap service
2024-08-30T16:02:18.631Z INF/device:plugins:screen:stream 48 [FA7371702902] Sending SIGTERM to minicap
2024-08-30T16:02:18.647Z INF/device:plugins:screen:stream 48 [FA7371702902] minicap says: "INFO: (jni/minicap/minicap.cpp:200) Received SIGTERM, stopping"
2024-08-30T16:02:18.725Z INF/device:plugins:screen:stream 48 [FA7371702902] minicap says: "INFO: (jni/minicap/minicap.cpp:536) Closing client connection"
2024-08-30T16:02:18.726Z INF/device:plugins:screen:stream 48 [FA7371702902] minicap says: "INFO: (external/MY_minicap/src/minicap_24.cpp:284) Destroying virtual display"
2024-08-30T16:02:29.005Z INF/device:plugins:screen:stream 48 [FA7371702902] Keeping 767x1112 as current frame producer projection
2024-08-30T16:02:29.006Z INF/device:plugins:screen:stream 48 [FA7371702902] Requesting frame producer to start
2024-08-30T16:02:29.007Z INF/device:plugins:screen:stream 48 [FA7371702902] Launching screen service minicap-bin
2024-08-30T16:02:29.007Z INF/device:resources:minicap 48 [FA7371702902] LD_LIBRARY_PATH=/data/local/tmp exec /data/local/tmp/minicap -S -Q 30 -P 1440x2560@767x1112/0
2024-08-30T16:02:29.058Z INF/device:plugins:screen:stream 48 [FA7371702902] minicap says: "PID: 30356"
2024-08-30T16:02:29.059Z INF/device:plugins:screen:stream 48 [FA7371702902] minicap says: "INFO: Using projection 1440x2560@626x1112/0"
2024-08-30T16:02:29.059Z INF/device:plugins:screen:stream 48 [FA7371702902] minicap says: "INFO: (external/MY_minicap/src/minicap_24.cpp:240) Creating SurfaceComposerClient"
2024-08-30T16:02:29.060Z INF/device:plugins:screen:stream 48 [FA7371702902] minicap says: "INFO: (external/MY_minicap/src/minicap_24.cpp:243) Performing SurfaceComposerClient init check"
2024-08-30T16:02:29.060Z INF/device:plugins:screen:stream 48 [FA7371702902] minicap says: "INFO: (external/MY_minicap/src/minicap_24.cpp:250) Creating virtual display"
2024-08-30T16:02:29.061Z INF/device:plugins:screen:stream 48 [FA7371702902] minicap says: "INFO: (external/MY_minicap/src/minicap_24.cpp:256) Creating buffer queue"
2024-08-30T16:02:29.061Z INF/device:plugins:screen:stream 48 [FA7371702902] minicap says: "INFO: (external/MY_minicap/src/minicap_24.cpp:261) Creating CPU consumer"
2024-08-30T16:02:29.062Z INF/device:plugins:screen:stream 48 [FA7371702902] minicap says: "INFO: (external/MY_minicap/src/minicap_24.cpp:265) Creating frame waiter"
2024-08-30T16:02:29.063Z INF/device:plugins:screen:stream 48 [FA7371702902] minicap says: "INFO: (external/MY_minicap/src/minicap_24.cpp:269) Publishing virtual display"
2024-08-30T16:02:29.063Z INF/device:plugins:screen:stream 48 [FA7371702902] minicap says: "INFO: (jni/minicap/JpgEncoder.cpp:64) Allocating 11061252 bytes for JPG encoder"
2024-08-30T16:02:29.064Z INF/device:plugins:screen:stream 48 [FA7371702902] Connecting to minicap service
2024-08-30T16:02:29.066Z INF/device:plugins:screen:stream 48 [FA7371702902] Reading minicap banner
2024-08-30T16:02:29.068Z INF/device:plugins:screen:stream 48 [FA7371702902] minicap says: "INFO: (jni/minicap/minicap.cpp:464) New client connection"