Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: global use is not working to launch firefox or webkit #7746

Closed
ortoniKC opened this issue Jul 20, 2021 · 4 comments · Fixed by #7806
Closed

[Bug]: global use is not working to launch firefox or webkit #7746

ortoniKC opened this issue Jul 20, 2021 · 4 comments · Fixed by #7806
Assignees

Comments

@ortoniKC
Copy link

ortoniKC commented Jul 20, 2021

Playwright version

1.12.3

Operating system

Windows

What browsers are you seeing the problem on?

Firefox

Other information

No response

What happened? / Describe the bug

The global use is not working to launch firefox or webkit

use: {
        headless: false,
        browserName: "firefox"
    }

I am using playwright test runner, if I use the project then it is executing the test in firefox or webkit.

Code snippet to reproduce your bug

playwright.config.ts
--------------------

import { PlaywrightTestConfig } from "@playwright/test";


const config: PlaywrightTestConfig = {
// not working
    use: {
        headless: false,
        browserName: "webkit"
    },
// working
   // projects: [{
    //     name: "Moz",
    //     use: {
    //         browserName: "firefox"
    //     }
    // }],
    testMatch: ["annotation.test.ts"],
    retries: 0,
    reporter: [["dot"], ["json", { outputFile: "test-result.json" }]],
}
export default config;

annotation.test.ts

import { test } from "@playwright/test";

test("second test", async ({ page }) => {
    console.log("second test running");
    await page.goto("https://letcode.in")
    console.log("second test completed");
});


### Relevant log output

```shell
DEBUG=pw:api npm run test

> test-runner@1.0.0 test Y:\video\playWright\test-runner
> npx playwright test

Using config at Y:\video\playWright\test-runner\playwright.config.ts

Running 1 test using 1 worker
  pw:api => browserType.launch started +0ms
  pw:api <= browserType.launch succeeded +565ms
  pw:api => browser.newContext started +0ms
  pw:api <= browser.newContext succeeded +29ms 
  pw:api => browserContext.newPage started +4ms
  pw:api <= browserContext.newPage succeeded +295ms
second test running
  pw:api => page.goto started +1ms
  pw:api navigating to "https://letcode.in", waiting until "load" +7ms
  pw:api   navigated to "https://letcode.in/" +105ms
  pw:api   navigated to "https://letcode.in/" +952ms
theme=light&bg_color=FFFFFF&slotNum=0&debug=&viewerCountry=IN" +2s
  pw:api   "domcontentloaded" event fired +225ms  pw:api   navigated to "https://mintclicks.com/display/index.php?page=query/items/&aduid=5597&width=728&height=90&displaytype=0&native=0&page_data=245cdcb4985172385b438dd492a6ac52&time=1626796043&deliver=letcode.in&search_keywords=letcode%2Cletcode%20koushik%2Cselenium%2Cprotractor%2Ctesting%2Cpractice%20site%2Cautomation%20practice%20site&page_referrer=aHR0cHM6Ly9sZXRjb2RlLmluLw==&page_title=LetCode%20with%20Koushik&meta_description=Self%20Learning%20-%20Automation%20Testing%20Platform" +13ms  pw:api   "domcontentloaded" event fired +1s  pw:api   "load" event fired +1ms  pw:api <= page.goto succeeded +1ms
second test completed
  pw:api => browserContext.close started +1ms  pw:api <= browserContext.close succeeded +113ms·  pw:api => browser.close started +5ms  pw:api <= browser.close succeeded +204ms

  1 passed (7s)
@pavelfeldman
Copy link
Member

Could you elaborate on what you are trying to do, what you expect to happen and what happens instead?

@ortoniKC
Copy link
Author

ortoniKC commented Jul 20, 2021

In my playwright.cofig.ts file, I have used

use: {
        headless: false,
        browserName: "firefox"
}

when executing the test file, it is executing on the chromium browser, but not the firefox.

@unlikelyzero
Copy link
Contributor

Can confirm this behavior. Happening on 1.13.0 as well

@ortoniKC
Copy link
Author

ortoniKC commented Aug 3, 2021

It is fixed in the 1.13.1 version. Thank you :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants