The latest Window should be the last one of getWindowHandles() returns

Obviously,   res.value[0] !== res.value[res.value.length - 1]. 
According to context, the latest window handle should be the last one element in the res.value array.