Skip to content

Instantly share code, notes, and snippets.

@SeanZoR
Created February 20, 2020 12:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SeanZoR/f3412d55e8c4d36475248e39a7d784b7 to your computer and use it in GitHub Desktop.
Save SeanZoR/f3412d55e8c4d36475248e39a7d784b7 to your computer and use it in GitHub Desktop.
Android's react-native-webview that doesn't flood the accessibility/UIAutomator2/Appium
/**
* If the WebView is causing constant refreshes to UI, and Appium/UIAutomator2 chokes on it,
* Use this. (To be given as a constructor argument to {@link RNCWebViewManager}.)
*/
public class WebViewAccessibilityIgnore implements WebViewConfig {
@Override
void configWebView(WebView webView){
webView.setImportantForAccessibility(IMPORTANT_FOR_ACCESSIBILITY_NO);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment