Fix the EventFiringWebDriver and therefore the failing test
* A wrapper around an arbitrary {@link WebDriver} instance which supports registering of a
* {@link WebDriverEventListener}, e&#46;g&#46; for logging purposes.
*/
-public class EventFiringWebDriver implements WebDriver, JavascriptExecutor, TakesScreenshot,
- WrapsDriver, HasInputDevices, HasTouchScreen,
- Interactive, HasCapabilities {
+public class EventFiringWebDriver implements
+ WebDriver,
+ JavascriptExecutor,
+ TakesScreenshot,
+ WrapsDriver,
+ HasInputDevices,
+ HasTouchScreen,
+ Interactive,
+ HasCapabilities {
private final WebDriver driver;
@@ -270,7 +276,7 @@ private Object unpackWrappedElement(Object arg) {
Map<?, ?> aMap = (Map<?, ?>) arg;
Map<Object, Object> toReturn = new HashMap<>();
for (Map.Entry<?, ?> entry : aMap.entrySet()) {
- toReturn.put(entry.getKey(), unpackWrappedElement(aMap.get(entry.getValue())));
+ toReturn.put(entry.getKey(), unpackWrappedElement(entry.getValue()));
}
return toReturn;
} else if (arg instanceof EventFiringWebElement) {
