setOrientation freeze if video playing on the page


#1

Hello,
I’m making test on a real Android device with webdriver IO and Appium. I use sometimes browser.setOrientation(‘landscape’) during a test to rotate the screen, it’s working great.
But if I have a video playing on the screen (as example a video ad in the middle of an article), the method freeze until the video end.

Example, I have a video playing, I use browser.setOrientation(‘landscape’). I see in the appium log :

[HTTP] {"orientation":"LANDSCAPE"}
[debug] [MJSONWP] Calling AppiumDriver.setOrientation() with args: ["LANDSCAPE","578823c5-7539-47d2-991f-3f4994d3becf"]
[debug] [AndroidBootstrap] Sending command to android: {"cmd":"action","action":"orientation","params":{"orientation":"LANDSCAPE","naturalOrientation":false}}
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"action","action":"orientation","params":{"orientation":"LANDSCAPE","naturalOrientation":false}}
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: orientation
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Desired orientation: LANDSCAPE
[debug] [AndroidBootstrap] [BOOTSTRAP LOG] [debug] Current rotation: ROTATION_0

but I have a freeze (no other action are running) untill the video ends… Then after the video, I see in Appium log:

[debug] [AndroidBootstrap] Received command result from bootstrap
[debug] [MJSONWP] Responding to client with driver.setOrientation() result: "Rotation (LANDSCAPE) successful."
[HTTP] <-- POST /wd/hub/session/578823c5-7539-47d2-991f-3f4994d3becf/orientation 200 27674 ms - 106

And then my script continue.
I don’t have an example of page because this ads are not 100% happens, but does it rings a bell to someone ?
Thanks