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] Fails when using with Botright #15

Open
johnyttt opened this issue Jul 24, 2024 · 0 comments
Open

[BUG] Fails when using with Botright #15

johnyttt opened this issue Jul 24, 2024 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@johnyttt
Copy link

Describe the bug
Can't use it with Botright, can not init AsyncInput when browser is Botright

Code Sample

async def runnnn():
        from cdp_patches.input import AsyncInput
        botright_client = await botright.Botright()
        proxy = "user:pass@host:port"
        browser = await botright_client.new_browser(proxy=proxy)
        # open a new page
        page = await browser.new_page()
        page.goto('https://horrods.com')
        async_input = await AsyncInput(browser=browser) <- fails here
        await async_input.click("left", 100, 100)

To Reproduce
Steps to reproduce the behavior:
Code above fails on the specified line because of this assertion:
image
Since Botright creates playwright browser using persistent context and in that case browser.browser returns None

@johnyttt johnyttt added bug Something isn't working help wanted Extra attention is needed labels Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant