Skip to content

Launch chrome and firefox in the same test #34287

@ajay-srikumar

Description

@ajay-srikumar

I am working on a automating a chat application. I need to open two instance of browsers and send messages between them. Is there a way in which I can login using chrome as one user and login using firefox as another user and test the chat functionality ?

I am able to open two instances chrome or two instance of firefox in a test, but unable to open one instance as chrome and the other instance as firefox.

This does not work

  test("Chat Test 1", async () => {
    const browser = await chromium.launch();
    const ff = await firefox.launch();

    const context1 = await browser.newContext();
    const context2 = await ff.newContext();

    const page1 = await context1.newPage();
    const page2 = await context2.newPage();

    await page1.goto("https://chat.com");
   await page2.goto("https://chat.com");
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions