-
Notifications
You must be signed in to change notification settings - Fork 94
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
Can't able to access the popover element in iOS device (Appium) #130
Comments
I'm not familiar with Appium, does it work on a normal iOS device or the official simulator? |
In official simulator we can't able to access the popover mobile element. |
Ok, I'll need a lot more details if you expect any help with this. As this library has worked for a lot of people, the issue is most likely with your setup. I would be happy to help if you can provide detailed reproduction steps. |
@Ram2103 @SteffeyDev The bug seems to lie with React Native or Appium. Elements which have To get round this with this when using eg: |
Interesting, I can add this to the troubleshooting steps. Are there any side affects when you use this work-around in appium? |
Only downside I see is that it can potentially be awkard to style the modal as it'll need relative positioning |
Running into same issue here. In iOS, elements inside the popover are not selectable in Appium. Adding Interesting thing I found is that react-native-popover-view works perfectly with Appium in andorid but not in iOS; on the other hand, react-native-modal-popover works correctly with Appium in iOS but not in android. Frustrating. |
That is really interesting @mochi08. I just peaked through the source code of |
First of all thanks @SteffeyDev for a great package and responding to us when we need help 🍻 The fix that I used for both v4.1.0 and v5.1.2 was by setting one of the tldr; Patch for v5.1.2: diff --git a/node_modules/react-native-popover-view/dist/BasePopover.js b/node_modules/react-native-popover-view/dist/BasePopover.js
index d6c290c..2bb3458 100644
--- a/node_modules/react-native-popover-view/dist/BasePopover.js
+++ b/node_modules/react-native-popover-view/dist/BasePopover.js
@@ -408,7 +408,7 @@ var BasePopover = /** @class */ (function (_super) {
React.createElement(Animated.View, { pointerEvents: "box-none", style: containerStyle },
this.props.showBackground !== false && (React.createElement(TouchableWithoutFeedback, { onPress: this.props.onRequestClose },
React.createElement(Animated.View, { style: backgroundStyle }))),
- React.createElement(View, { pointerEvents: "box-none", style: __assign({ top: 0, left: 0 }, shadowStyle) },
+ React.createElement(View, { pointerEvents: "box-none", style: { position: 'relative', flex: 1 } },
React.createElement(Animated.View, { style: transformStyle },
React.createElement(View, { ref: this.popoverRef, style: contentWrapperStyle, onLayout: function (evt) {
var layout = __assign({}, evt.nativeEvent.layout); I'd recommend patching the package before running tests and then unpatching after, rather than using this patch permanently as it may not work as @SteffeyDev intended. |
@quizzyDev your solution is awesome! I'm using v4.1.0 and applied the fix in dist/Popover.js. Now I don't have to add "position: relative" whenever I use the popover and it's working in Appium. What's more is that it doesn't result in the same styling issues as before. I haven't found any problem with any of my popovers yet. Thank you very much! |
I'll run some tests on this patch and see if this works, I would be fine including this change in the repo if there's no downsides. |
@SteffeyDev - Just updated to |
Thanks for bringing this to my attention, I had been experimenting and forgetting to stash before building. I re-released as 5.1.5 without these changes, I need to do more testing to make sure that won't break anything. However, I suppose you can stick with 5.1.4 if it works for you and fixes the appium issue. |
No worries @SteffeyDev - I thought that'd be the case. |
We cannot able to access the popover element in iOS device using Appium, whereas we can able locate the popover element in Android device.
The text was updated successfully, but these errors were encountered: