木偶:如何在HTTP重定向之前检测新打开的选项卡的url

我正在写一些集成测试。

My web app opens a new tab/window when a button is clicked (via window.open()). The URL of the new tab http redirects once to a final url. I'd like to be able to detect what the first URL was (IE. the url passed to window.open()) before landing on the final page.

I understand there is a request.redirectChain() API, which would (in theory) give me the data I need, although I have no idea how to get a reference to the initial request invoked by window.open() API.