I am facing a problem, when running a test method using multiple threads with TestNG.

The test method is ran two times using two threads with below configuration:

```
@Test(threadPoolSize=2,invocationCount=2)
public void mainRun() { ... }

```

It is launching two browsers for executing the test method in parallel as expected. After launching the browsers, it has to type some text in a text box. So, during this step, the text was sent to text box 'twice' in one browser and the other browser was idle.

Can someone please guide me how to overcome this problem?