My test needs to adjust the volume of the device using control center - but I am unable to do so using Appium2
Here are the steps:
-Launch the app under test
-Open control center by swiping down
-Adjust the volume in the volume slider
I am unable to adjust the volume slider as the element is not recognized using appium inspector, also the page source doesnt show any element of the control center, instead shows the elements of the app under test
But if I background the app under test, I can see the volume slider elements and I am able interact successfully.
This code of mine works just fine with appium 1.XX versions
Can someone please provide some inputs around this issue? (Same is the case with all OS pop ups, unable to interact when the app under test is in foreground)
1 Like
platform is IOS. I don’t think you can actually send events to the “secured” settings screen, that’s a secure screen if I remember rightly. Why are you not trying to be using media keys instead? You might be noticing this worked on older ios versions?
The control center UI might belong to another application. Try Appium Pro: Switching Between iOS Apps During a Test
You may also try appium-xcuitest-driver/docs/reference/execute-methods.md at master · appium/appium-xcuitest-driver · GitHub to simulate pressing on hardware volume control buttons as a possible workaround.
My assumption is that the control center is the counterpart for adjusting the volume with the physical buttons, our app needs that to change, I tried the other volume settings - but our app doesnt take that into account
Yes, this works perfectly fine with 1.22.3
The control center worked perfectly fine with appium 1.22.3, yes we can use the workaround by backgrounding the app but I see one more issue where the iOS OS pop ups(system pop ups) are being detected when the app under test is in the background, as we need the app to be in foreground to acknowledge the pop ups, as most of our tests use AutoAcceptAlerts=false