You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are currently using Appium to build a few tests that concern Auth. We use Native Screensets and need to access the context of the Screenset in order to perform actions on it with the Appium driver. Currently its not available when using the gigya_flutter_plugin. However, I was able to make it work by making a few changes as its already implemented in iOS.
All we need to do is set the GigyaLogger to debug mode if user is running the app in Debug mode. This will ensure the WKWebView is inspectable.
For Android, we need to set the WebView.setWebContentsDebuggingEnabled(true). This has not been implemented yet in Android SDK by checking for the GigyaLogger.isDebug() value, but it can be enabled globally without needing access to that specific WebView using WebView.setWebContentsDebuggingEnabled(true).
Suggestion:
Accept a isDebug value in showScreenSet SDK function. If this is true, we will set GigyaLogger to debug in iOS and in Android we will call WebView.setWebContentsDebuggingEnabled(true).
Instead of adding a new isDebug bool value, we can also use BuildConfig.DEBUG (Android) or #if DEBUG (iOS). Although this would make it a bit restricted for the users as those values are tied to the build rather than what the Flutter app passes via a function. But in most cases, this would work fine.
I will create a PR with the suggested fix above.
Reproduction
Run iOS or Android Flutter App
Run Appium server
Try and access WebView context
Additional context
No response
SDK version
1.0.5
Android/iOS
Android/iOS
The text was updated successfully, but these errors were encountered:
Checklist
Description
We are currently using Appium to build a few tests that concern Auth. We use Native Screensets and need to access the context of the Screenset in order to perform actions on it with the Appium driver. Currently its not available when using the gigya_flutter_plugin. However, I was able to make it work by making a few changes as its already implemented in iOS.
https://github.com/SAP/gigya-swift-sdk/blob/1ace6fd17dbd04478da429e112f04a0109883565/GigyaSwift/Global/Plugins/GigyaWebBridge.swift#L89
All we need to do is set the GigyaLogger to debug mode if user is running the app in Debug mode. This will ensure the WKWebView is inspectable.
For Android, we need to set the WebView.setWebContentsDebuggingEnabled(true). This has not been implemented yet in Android SDK by checking for the GigyaLogger.isDebug() value, but it can be enabled globally without needing access to that specific WebView using
WebView.setWebContentsDebuggingEnabled(true)
.Suggestion:
Accept a isDebug value in showScreenSet SDK function. If this is true, we will set
GigyaLogger
to debug in iOS and in Android we will callWebView.setWebContentsDebuggingEnabled(true)
.Instead of adding a new isDebug bool value, we can also use BuildConfig.DEBUG (Android) or #if DEBUG (iOS). Although this would make it a bit restricted for the users as those values are tied to the build rather than what the Flutter app passes via a function. But in most cases, this would work fine.
I will create a PR with the suggested fix above.
Reproduction
Additional context
No response
SDK version
1.0.5
Android/iOS
Android/iOS
The text was updated successfully, but these errors were encountered: