Forum Discussion

Diceman's avatar
Diceman
Occasional Contributor
8 years ago
Solved

How do I easily switch back and forth between two pages?

I am writing tests for a client-facing web application.   There is a chat widget which indicates if it is online or not.   I would like to write a test which logs in as a client and validates that the widget is offline.   Then I would like another browser window (or page, doesn't matter) launched which logs into the system as a customer support agent and activates chat and confirms that it looks live from the agent side.   Finally, I would like to switch back to the client window and make sure the widget became live.

 

I have been looking for information on how to do this with variables, but I'm learning as I go, and I've already spent too much time trying to build this test.   I hope this is a relatively simple sort of test that others have written before.   Can someone tell me the best way to go about this test?

  • Easiest way is probably to use two different browser.

     

    Do one with IE, one with Chrome. Or whatever.

     

    Are the URL's in use different? If they are, you can easily open two instances of the same browser and simply use the URL to tell them apart. I do this all the time. Commonly have 4 or 5 instances of Chrome open. Each with a different URL. Switch between them is simple.

     

    If the URL's are the same, it can still be done, but in this case, it would be a lot simpler just to use two different browsers.

     

    Also, if they are logging into the same site effectively, and thus there is the potential for cookies to clash, I would definitely go for two different browsers.

6 Replies