Closed
Description
openedon 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
No labels