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

page.mouse.click() , page.mouse.down() , page.mouse.up() are not working on cloudflare's IUAM while regular playwright's does #139

Open
Hiradpi opened this issue Dec 17, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Hiradpi
Copy link

Hiradpi commented Dec 17, 2024

import time
from patchright.sync_api import sync_playwright
from PIL import Image, ImageDraw
import io
import random
from camoufox.sync_api import Camoufox


with Camoufox(humanize=True) as context:
    page = context.new_page()
    page.goto('https://coinsniper.net/new', wait_until='networkidle')
    print("clicking")
    element = page.get_by_text("Verify you are human")
    print(element.count())
    element_bb = element.bounding_box()
    time.sleep(3)
    clickpos_x = float(f"{element_bb['x']+30}.{random.randint(14534, 94534)}")
    clickpos_y = float(f"{element_bb['y']+100}.{random.randint(14534, 94534)}")
    print(clickpos_x, clickpos_y)
    page.mouse.move(clickpos_x, clickpos_y)
    # time.sleep(3)
    # page.mouse.click(clickpos_x, clickpos_y)
    page.mouse.down()
    time.sleep(random.randint(600, 900)/1000)
    page.mouse.up() 
    
    print("clicked")
    time.sleep(300)
    context.close()

im not sure why but the click function is not clicking at all

@Hiradpi Hiradpi added the bug Something isn't working label Dec 17, 2024
@yungd1plomat
Copy link

i think this is the same problem:
microsoft/playwright#21780
#144

@Hiradpi
Copy link
Author

Hiradpi commented Dec 22, 2024

i think this is the same problem: microsoft/playwright#21780 #144

no i do not think that is related

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants