-1

In a file I have 5 'it' blocks under single describe block, is a way where I can execute 1 test case always on Chrome browser while executing other 4 on Firefox or IE?

1 Answers1

0

One of the ways to approach it is this way

it("Search by name", async () => {

    // open home page
    await browser.get(params.baseUrl);

    let capabilities = await browser.getCapabilities();
    let browserName = capabilities.map_.get('browserName');

    if (browserName === "chrome") {
        // your test goes here
    }
});
Sergey Pleshakov
  • 7,964
  • 2
  • 17
  • 40