'Object created for another class opening as new web driver window

public class ListPage extends BaseTest 
{private ListPageManage Object;
   private Test Object1;
 public void getList() throws InterruptedException 
{ this.Object = new ListPageManage(getDriver());
    this.object1=new Test();

super.performDefaultLogin(); }}'

I want to call a method from class Test hence i created object 'Object1' but it is opening new chrome driver window and performing the actions in that new window, but when i comment that object creation line, execute the code its not opening new window and it throwing an error as this.object1 is null.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source