[Add] browser-use and main.py
This commit is contained in:
parent
08e64bdf45
commit
96914d44ac
221 changed files with 30952 additions and 1 deletions
21
browser-use/tests/test_full_screen.py
Normal file
21
browser-use/tests/test_full_screen.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import asyncio
|
||||
|
||||
from playwright.async_api import async_playwright
|
||||
|
||||
|
||||
async def test_full_screen(start_fullscreen: bool, maximize: bool):
|
||||
async with async_playwright() as p:
|
||||
browser = await p.chromium.launch(
|
||||
headless=False,
|
||||
args=['--start-maximized'],
|
||||
)
|
||||
context = await browser.new_context(no_viewport=True, viewport=None)
|
||||
page = await context.new_page()
|
||||
await page.goto('https://google.com')
|
||||
|
||||
await asyncio.sleep(10)
|
||||
await browser.close()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
asyncio.run(test_full_screen(False, False))
|
||||
Loading…
Add table
Add a link
Reference in a new issue