In my current application, manually when i click on a Button say 'Buy' button it takes me to a different site within the same browser (in another tab). Usually I can switch to the Tab using
driver.switchTo().defaultContent();
But while am doing it in automation the second site is opening in a different browser. How can i handle this. I want this to open within a the same browser like how its happening when i do it manually. Please help me out. Thanks in advance.