MCPcopy Index your code
hub / github.com/HtmlUnit/htmlunit / reset

Method reset

src/main/java/org/htmlunit/WebClient.java:2387–2399  ·  view source on GitHub ↗

Experimental API: May be changed in next release and may not yet work perfectly! This shuts down the whole client and restarts with a new empty window. Cookies and other states are preserved.

()

Source from the content-addressed store, hash-verified

2385 * Cookies and other states are preserved.
2386 */
2387 public void reset() {
2388 close();
2389
2390 // this has to be done after the browser version was set
2391 webConnection_ = new HttpWebConnection(this);
2392 if (javaScriptEngineEnabled_) {
2393 scriptEngine_ = new JavaScriptEngine(this);
2394 }
2395
2396 // The window must be constructed AFTER the script engine.
2397 currentWindowTracker_ = new CurrentWindowTracker(this, true);
2398 currentWindow_ = new TopLevelWindow("", this);
2399 }
2400
2401 /**
2402 * <p>Blocks until all background JavaScript tasks have finished executing or until the specified

Callers 1

resetMethod · 0.95

Calls 1

closeMethod · 0.95

Tested by 1

resetMethod · 0.76