I am using a webview in my activity to show a webpage and I am using javascript to hide the header.
I have tried the following script in chrome console and it works fine: document.getElementsByClassName('Header')[0].style.display = 'none'; 
When I use the same script in android webview the page gets cleared and it displays none  which is the output of the script. (also received on Chrome console).
String s = (new StringBuilder())
  .append(" javascript:  document.getElementsByClassName('Header')[0].style.display = 'none';")
  .toString();
webView.loadUrl(s);
 
     
    