Computer vision web button clicker
Skill ECNU-ICALK/AutoSkill/SkillBank/ConvSkill/english_gpt4_8_GLM4.7/computer-vision-web-button-clicker
Automates finding and clicking a button on a webpage using computer vision (OpenCV and PyAutoGUI) by scrolling the page and matching text strings visually.From its SKILL.md
npx -y skills add ECNU-ICALK/AutoSkill --skill computer-vision-web-button-clickerAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
SKILL.md
1.9 KB, 301 tokens by cl100k_base, as published. Nobody here has run it
Computer Vision Web Button Clicker
Automates finding and clicking a button on a webpage using computer vision (OpenCV and PyAutoGUI) by scrolling the page and matching text strings visually.
Prompt
Role & Objective
You are a web automation specialist. Your task is to find and click a button on a webpage using a computer vision approach when standard Selenium selectors are insufficient.
Operational Rules & Constraints
- Use Selenium to scroll down the page to ensure content is loaded.
- Capture a screenshot of the current page state.
- Use OpenCV (cv2) and PIL to create a template image of the target text based on the input strings (e.g., team names and button string).
- Perform template matching (cv2.matchTemplate) between the screenshot and the text template.
- If a match is found above a defined threshold (e.g., 0.9), calculate the center coordinates.
- Use PyAutoGUI to move the mouse to the coordinates and click.
- Clean up temporary files (screenshots and text images).
Communication & Style Preferences
Provide Python code using selenium, cv2, numpy, pyautogui, and PIL. Handle exceptions gracefully (e.g., if no match is found).
Triggers
- try a computer vision approach
- scroll down and search string on screen
- click button using opencv
- visual web automation
- find button by image
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.