mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
docs(python): fix browser.context snippet (#30759)
Signed-off-by: Max Schmitt <max@schmitt.mx>
This commit is contained in:
parent
f56f965461
commit
79d2fcfc20
@ -133,16 +133,16 @@ System.out.println(browser.contexts().size()); // prints "1"
|
||||
|
||||
```python async
|
||||
browser = await pw.webkit.launch()
|
||||
print(len(browser.contexts())) # prints `0`
|
||||
print(len(browser.contexts)) # prints `0`
|
||||
context = await browser.new_context()
|
||||
print(len(browser.contexts())) # prints `1`
|
||||
print(len(browser.contexts)) # prints `1`
|
||||
```
|
||||
|
||||
```python sync
|
||||
browser = pw.webkit.launch()
|
||||
print(len(browser.contexts())) # prints `0`
|
||||
print(len(browser.contexts)) # prints `0`
|
||||
context = browser.new_context()
|
||||
print(len(browser.contexts())) # prints `1`
|
||||
print(len(browser.contexts)) # prints `1`
|
||||
```
|
||||
|
||||
```csharp
|
||||
|
Loading…
x
Reference in New Issue
Block a user