-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Error copying attributes #372
Comments
Try to merge this PR to your local source and then add waitForNoAnimationsActive API call before to locate the corresponding element. It looks like XCTest does not like when one reads attributes while on-screen animation is active in the corresponding container. That is why it is necessary to make sure all the animations have been finished before to locate the corresponding element and read its attributes. |
Thanks! I'll give that a shot today! |
Nope. I called that API before every call to page source, verified I got 200's back, and I still got
This particular spot is a gmail auth screen in a webview - there's really nothing animating. The odd thing is that when this happens, subsequent page source requests go through immediately. If it helps debugging, the page source in this case is here. |
What if you just add hardcoded sleep to make sure the webview has been successfully loaded before invoking getPageSource? |
@toejough Can you change this method too always return |
always returning |
Personally, I can live with this. any incorrect visibility states that arise in my test code can be dealt with much more easily than those long timeouts. Thank you very much for your attention and work on this!! |
any update about this issue? |
Hi all, Any update for fixing of this issue. Our Automation is stuck due to this. |
@prahlad06, @muratme Still in progress. You could help us by creating test case that will raise this issue in situation you are facing. |
This is what I did for my local source and I don't see that bloody error anymore. Please try this patch for your local WDA sources and see whether the problem is fixed and there are no new issues pop up: File WebDriverAgentLib/Categories/XCUIElement+FBIsVisible.m replace the content of (BOOL)fb_isVisible method with - (BOOL)fb_isVisible
{
return !CGRectIsEmpty(self.frame) && !CGRectIsEmpty(self.visibleFrame);
} |
I'll create a PR if you confirm the fix works and does not create additional problems with visibility detection. |
ooh, I'll give this one a try today. |
@mykola-mokhnach You will definitely have problems with iOS 9.x. As I already tried similar approach. Main problem was that lots of invisible cell were reported with frames in top right corner with proper size. However I think in iOS 10.x it has good chance of working as Apple stopped reporting weird cell cases. |
@marekcirkos What if we check the actual OS version and use the current approach for the old version only (9.X)? Anyway, more than 80% of WDA users already run their tests on 10.0+. |
@toejough did the patch work for you? |
Yes, and some of it seems stuff that I was easily getting to work with 1.6.3...I keep getting "[__NSPlaceholderArray initWithObjects:count:]: attempt to insert nil object from objects[1]" |
@mykola-mokhnach I would like to apply your fix locally. I go open up the WebDriverAgent project in Xcode and go to WebDriverAgent > PrivateHeaders > XCTest but I'm failing to find the file named XCUIElement+FBIsVisible.m. Could you anyone please help me locate it? Also, do I simply paste this in there?
|
How is stuff now? Can we consider it fixed? |
Based on the last comments, no? It'd be good if some of the other participants responded. I'm responding because I opened the issue, but personally, I had to get things working so I wrote custom installation scripts to do the visibility code patching back in November. If this is just waiting on me, you can close it, because I've been doing fine with that workaround, but it'd be good to hear from others who've had the problem if it's still a thing they fight with or not. |
WebDriverAgent --HEAD |
Not fixed, still hitting this issue
WebDriverAgent --HEAD |
Yes i get the same issue in my app, with Appium 1.7.0 This is a blocker for us in executing automation on iOS 10.x and 11.x versions. Any possible fix? |
Has anyone came cross this situation: |
I have the same issue when test opens menu with animation.
|
Appium.app: 1.2.7 (1.2.7) Same issue occurs on my side too, throwing same logs mentioned by @shynkevich-alex LOGS:
Does anyone know how to resolve this? |
@marekcirkos I just encountered this issue. Nothing more will be attempted to resolve this issue? Thanks |
what is the resolution here ?? any updates ?? |
still facing the same issue. do we have any update on when this will be fixed? |
@amit Can you provide the log and capabilities which you are using?
…On Tue, 9 Apr, 2019, 7:48 PM amit-punjabi, ***@***.***> wrote:
still facing the same issue. do we have any update on when this will be
fixed?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#372 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AJ9u3zCY-hGCBNKeYOg6PmA1u67E8Fdsks5vfKE-gaJpZM4Kyqzy>
.
|
The same error under the same conditions as #357. Opening a new issue because that was closed as resolved by the author after the last visibility fix, so I'm assuming that this is a related, but different, root cause.
Relevant log:
I'm happy to try any suggested code edits, but I don't know enough about obj-c or XCUI test itself to dig around too much on my own at the moment.
I'd also be happy to have missed a step in updating this project under Appium. I've followed the steps I outlined for a successful update in #317, as well as here and here
The text was updated successfully, but these errors were encountered: