microsoft / playwright

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
https://playwright.dev
Apache License 2.0
66.45k stars 3.63k forks source link

[BUG] Docs - misnamed launch parameters in python docs #5336

Closed Mattwmaster58 closed 3 years ago

Mattwmaster58 commented 3 years ago

The python docs define the following parameters for launch:

handle_sighup <bool> Close the browser process on SIGHUP. Defaults to true.
handle_sigint <bool> Close the browser process on Ctrl-C. Defaults to true.
handle_sigterm <bool> Close the browser process on SIGTERM. Defaults to true.

However, this doesn't reflect what's in the libary. The correct parameters are named handleSIGHUP, handleSIGINT and handleSIGTERM

dgozman commented 3 years ago

Thank you for the issue, we'll fix it!

Do you need to use these options, or just stumbled upon them? If the former, could you please share your scenario?

Mattwmaster58 commented 3 years ago

I was messing around trying to solve this https://github.com/microsoft/playwright-python/issues/483 and knew of these options existence due to work with pyppeteer prior.

Mattwmaster58 commented 3 years ago

Hmm, maybe the documentation is in sync with the alpha? Just based on this info on the alpha:

The API has changed since the last 0.170.0 version:

Snake case notation for methods and arguments:


# old
browser.newPage()
# new
browser.new_page()
dgozman commented 3 years ago

You are right, 1.8alpha and future version use snake case, so it should be handle_sighup and alike. I just double-checked the source code, sorry for not spotting that earlier.