January 2018
Beginner to intermediate
354 pages
7h 59m
English
The next example shows how to pass Map into the setDriver method using the varargs parameter:
// first, create a map for the key:value pairs to pass into the driverMap<String, Object> preferences = new HashMap<String, Object>;// then put the key:value pairs into the mappreferences.put("applicationCacheEnabled",false);preferences.put("network.cookie.cookieBehavior", 0);// then, pass the map into the setDriver methodCreateDriver.getInstance().setDriver("firefox", "Windows 10", "local", preferences);
Read now
Unlock full access