How to Switch to new window through scripting

I am testing one application which has ms ad login. When I am hitting the URL one new window is popping up where I need to provide the credential. I am not sure how to switch to that window.
Can you please prove me any solution for this. I am using the below code which is getting failed.

logData 0

// put URL to navigate
navigate https://uipt.qa.dna.informa-labs.com
sleep 3
//Login Info
logData 1
setValue name=loginfmt
submitForm id=idSIButton9
setValue name=passwd
submitForm id=idSIButton9
submitForm id=idSIButton9

You can’t. WebPageTest block pop-ups and new windows and only supports single-window testing.