If you have a CSS selector for that element, do this:
String js = "document.querySelector('your-selector').style.display = 'none';"
WebUI.executeJavaScript(js, null)
For example, this will remove the navigation bar at the top of this web page:
String js = "document.querySelector('#bar').style.display = 'none';"
WebUI.executeJavaScript(js, null)
However, be warned, modifying a web page for the purpose of testing it is generally a bad idea.