Hey there, I am trying to automate few things for Spotify and I have some performance issues after playing a song.
I am pretty new to Appium so I hope there is something that I’ve missed with my Python script (using Unit tests)
My Python script runs without significant delay when I don’t play any songs, but after playing a song there are 30-60 seconds delay between following actions.
I am using my physical device for the test Xiaomi Poco F4 connected to Mac via USB
I am starting Spotify Activity by: self.driver.start_activity("com.spotify.music", ".MainActivity")
And playing a song by running this command: self.driver.find_element(by=AppiumBy.ID, value="com.spotify.music:id/button_play_and_pause").click()
Song starts playing and after that script seems to run slowly, I’ve tried to printing a log from consoleprint(time) after song is played, but I got a log after 30 seconds or so.
After pausing a song script runs without significant delays.
Best advice is probably to try the strategies outlined in the above articles, but ultimately you may want to go with a phone that has better performance.
Try to reduce the value of waitForIdleTimeout setting as a possible workaround. It might be the playback thread does not let the app to stay in idle mode for long enough.
@mykola-mokhnach I have the same delay issue on Android when using any appium action when music is playing. According to the latest Android development updates, this timeout is no longer supported in recent Android versions:Configurator | Android Developers. Is there any other solution, please ?