-
-
Notifications
You must be signed in to change notification settings - Fork 6.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Appium hangs while finding element in a video player. #9147
Comments
|
@mykola-mokhnach I'm already using uiautomator2. I verified and there are no background animations. However, some other api calls are being made even after the content is paused. Is there anyway, we can force driver to find element even if app isn't idle? |
I don't know any way to change this behaviour from the outside |
Have you tried latest Appium beta with newer uiautomator2 driver version? |
Yes, I tried with latest beta versions, still doesn't work. hierarchy looks good in everywhere. Server doesn't return anything as its waiting for app to become idle. |
@mykola-mokhnach @jlipps @sravanmedarapu I tried to set waitForIdleTimeout to 0 in appium settings |
Can you try to update to the most recent beta and set the disableWindowAnimation capability to true ? |
@mykola-mokhnach thanks for the suggestion. unfortunately, disableWindowAnimation that doesn't seem working for me. Tried in the latest beta. More detailed logs here |
@ajeeshvl next thing I'd try is see if building a similar test in UiAutomator2 directly is possible |
@jlipps thanks for the suggestion. You meant creating test using android.support.test.uiautomator libraries or by sending commands directly to UiAutomator2 server? |
@ajeeshvl The reason that setting There is also a minor bug in My temporary solution is to build You can try with the binaries I built here. Just install those two apk files before running appium. Make sure version of those apks are the same as that specified in |
@SaneBow I tried your solution with the binaries you built. I'm still having issues with appium hanging on trying to find an element. I made sure that the installer.js file had the right name/version to match the new files in the uiautomator2 folder. I have set Not sure what else to try here as this issue has been plaguing us for a long time here as well: |
@Mcfli Could you post your |
@MCFil It seems like you didn't set the self.driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps)
self.driver.update_settings({
"waitForIdleTimeout": 3000, # 3 seconds
}) When you set it correctly, you will see something like this in adb logcat
|
@SaneBow I appreciate the help. That was my problem with getting it initially set. Although now it looks like that setting is not persisting past the first search attempt. I set the All of these log files were after sending one search command Attaching logs here: |
@Mcfli Its woking fine for me in java_client I would also suggest you to cleanup uiautomator2 apks from your device and try running test again. |
@Mcfli It seems to me that you haven't successfully replaced default
Once you install them correctly, you should see lines like |
@SaneBow Android UIAutomator has an option to set the idle timeout. See the implementation for this in UiAutomator2. https://github.com/appium/appium-uiautomator2-server/blob/cad845dac019af3b71684bd5f21f2c1e87d1880a/app/src/main/java/io/appium/uiautomator2/model/settings/WaitForIdleTimeout.java |
@ajeeshvl Yes, I am aware of that. The problem is that the setting won't be applied sometimes. This is a bug in google's UiAutomator library. See https://android-review.googlesource.com/c/platform/frameworks/uiautomator/+/587048 |
@SaneBow That definitely did the trick! Thanks for all your help. |
There is also |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
The problem
I'm trying to to automate play back controls in a video player. When touch on the player container, an overlay appears. When Appium tries to find element on overlay, it hangs.
I tried following, nothing worked
Environment
*Appium version (or git revision) that exhibits the issue: 1.6.5
Desktop OS/version used to run Appium: Mac OS (Sierra) 10.12.4
Node.js version (unless using Appium.app|exe): v7.3.0
Mobile platform/version under test: Android 7.0.1 / 6.0.1
Real device or emulator/simulator: Real device
Appium CLI or Appium.app|exe: Appium CLI
Link to Appium logs
https://gist.github.com/ajeeshvl/96c00c60cab8099095105a347a1e6647
The text was updated successfully, but these errors were encountered: