DEV Community

0x3d Site
0x3d Site

Posted on

16 8 12 10 12

Automate Filling Forms on Any Website with Python

These products have happy customers and reliable expertise. PLUS, GET A 50% DISCOUNT—EXCLUSIVELY AVAILABLE HERE! It costs less than your daily coffee.


Tired of Typing the Same Info Again and Again? Let Python Do It!

Ever had to fill out the same online form over and over again?

✅ Job applications

✅ Login forms

✅ Online surveys

✅ Checkout pages

What if Python could fill them for you automatically?

Let’s build a simple Python bot that opens a webpage, fills in the form, and submits it—all hands-free! 🚀


Step 1: Install the Required Libraries

We’ll use Selenium, a powerful tool for automating web tasks. Install it with:

pip install selenium webdriver-manager
Enter fullscreen mode Exit fullscreen mode
  • selenium → Controls the browser
  • webdriver-manager → Ensures you have the right browser driver

Step 2: Set Up the Web Browser

To control a browser, we need a web driver. Let’s use Chrome:

from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
from selenium.webdriver.chrome.service import Service

service = Service(ChromeDriverManager().install())
driver = webdriver.Chrome(service=service)
Enter fullscreen mode Exit fullscreen mode

This launches Chrome in a controllable mode.


Step 3: Open a Website and Find the Form

Now, let’s navigate to the form page we want to fill:

driver.get("https://example.com/form-page")  # Replace with your form's URL
Enter fullscreen mode Exit fullscreen mode

To interact with the form, we need to find input fields using their name, ID, or CSS selector.

Use right-click → Inspect Element in Chrome to find them.

Example:

<input type="text" id="name" name="full_name">
<input type="email" id="email" name="email_address">
<button type="submit">Submit</button>
Enter fullscreen mode Exit fullscreen mode

Step 4: Fill the Form with Python

We use Selenium’s find_element method to target fields and enter text:

from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys

# Find input fields and enter data
driver.find_element(By.NAME, "full_name").send_keys("John Doe")
driver.find_element(By.NAME, "email_address").send_keys("johndoe@example.com")
Enter fullscreen mode Exit fullscreen mode

Step 5: Click the Submit Button

Finally, let’s submit the form:

driver.find_element(By.CSS_SELECTOR, "button[type='submit']").click()
Enter fullscreen mode Exit fullscreen mode

🚀 Done! Python just filled and submitted the form for you!


Step 6: Handle CAPTCHAs and Logins (Bonus Tip!)

Some websites block bots with CAPTCHAs or logins.

Here’s how to bypass login forms:

driver.find_element(By.NAME, "username").send_keys("your_username")
driver.find_element(By.NAME, "password").send_keys("your_password")
driver.find_element(By.CSS_SELECTOR, "button[type='submit']").click()
Enter fullscreen mode Exit fullscreen mode

For CAPTCHAs, try:

  • Manually solving it once (Python saves session cookies)
  • Using services like 2Captcha (not free)

Want More Python Automation Tricks?

🔹 Trending Repositories – Discover powerful automation tools

🔹 Developer Resources – More tools for building Python bots

🔹 Articles – Learn real-world Python tricks

Now go automate your most annoying web tasks! 🚀


🎁 Download Free Giveaway Products

We love sharing valuable resources with the community! Grab these free cheat sheets and level up your skills today. No strings attached — just pure knowledge! 🚀

🔗 More Free Giveaway Products Available Here

  • We've 15+ Products for FREE, just get it. We'll promise that you'll learn something out of each.

For More Learning Purpose

HTMX: Building Dynamic Front-Ends Without JavaScript

⚡ Build Faster, Leaner Web Apps Without JavaScript Bloat React, Vue, Angular—bloated, complex, and overkill for most projects. HTMX is the future: lightweight, efficient, and powerful. This guide shows you how to ditch the JavaScript madness and build interactive, dynamic front-ends using only HTML.🚀 You’ll Learn:✅ How to make AJAX requests without writing JavaScript✅ Dynamic updates, real-time content, and interactive UIs—all in HTML✅ Why big frameworks are slowing you down (and what to use instead)✅ Practical, hands-on examples you can apply todayWeb dev should be simple. HTMX brings back the speed and efficiency.

favicon 0x7bshop.gumroad.com

Build a Hyper-Simple Website for a Local Business and Charge $500+

Imagine this: You help a local business finally get online, transforming their visibility, and they happily pay you $500 or more for a website you built in just a few hours.You feel empowered.They feel grateful.It’s a win-win — and you don’t need to be an expert to make it happen.I’ve created a complete toolkit designed to remove every obstacle and hand you a simple, repeatable system to build websites, find clients, and get paid — fast.Here’s what you get:📘 1. The Local Digital Goldmine Guide (10 Pages of Pure Value) This step-by-step guide breaks down the entire process into simple, actionable steps: Why Local Businesses Need Simple Websites: Understand the massive opportunity in your local area. The No-Code Website Formula: Build a sleek, professional site in under 2 hours using free or low-cost tools. Finding &amp; Pitching Clients Without Cold Calling: Use non-salesy strategies to attract clients, even if you hate selling. Pricing &amp; Upselling for Recurring Income: Charge $500+ upfront, then stack passive income with hosting and maintenance upsells. You’ll finish this guide not just feeling motivated — but knowing exactly what to do next.✅ 2. Plug-and-Play Checklist (Stay Laser-Focused) Success is simple when you follow a proven process. This checklist is your roadmap: 📍 Pre-Launch Preparation: Research businesses, choose tools, and set up your payment system. 🔍 Client Outreach: Use personalized email scripts and follow-ups to land your first paying client. 🛠️ Website Build: Follow a structured flow to build and launch your client's site. 🤝 Client Management: Communicate like a pro, gather testimonials, and build lasting relationships. 💸 Pricing &amp; Upsells: Lock in high-paying clients, then offer ongoing services for passive income. No overthinking. No confusion. Just tick the boxes, and watch your business grow.🔑 3. Handcrafted ChatGPT Prompts (Your AI-Powered Assistant) Why struggle to write client emails or site content when AI can do it for you? These prompts will save you hours: ✍️ Website Content: Generate compelling headlines, service descriptions, and "About Us" sections. 📧 Client Emails: Draft outreach, follow-ups, and pitch emails in seconds. 📈 SEO &amp; Optimization: Find the best local keywords, write meta descriptions, and boost site rankings. 🎨 Design &amp; Aesthetics: Get layout suggestions, color palette ideas, and font recommendations. 💰 Pricing &amp; Upsells: Brainstorm service packages, pricing tiers, and irresistible upsell offers. You’ll feel like you have a full team behind you — even if you’re a one-person business.👉 This Isn’t Just a Product — It’s a Transformation You’re not just buying a bundle of files. You’re buying: 🔓 Clarity: Know exactly what to do, step by step. ⚡ Speed: Build and launch sites faster than you thought possible. 🧠 Confidence: Feel equipped to approach clients and charge what you're worth. 📈 Freedom: Create a flexible, low-stress income stream from anywhere. Think about it: There are thousands of local businesses that desperately need a website.With this toolkit, you can be the person who delivers that solution — and gets paid handsomely for it.It’s not a question of whether you can do this. The question is: How soon do you want to start?🚀 One decision. One small investment. Infinite potential. Let’s build something incredible.

favicon 0x7bshop.gumroad.com

Making extra income by selling websites has never been easier—AI does most of the work for you!

No need to spend hours researching or figuring things out on your own. This step-by-step blueprint gives you everything you need:

  • ✔️ A complete guide that walks you through the process
  • ✔️ Detailed checklists so you don’t miss a thing
  • ✔️ Pre-made ChatGPT prompts to make website creation effortless

It’s all laid out for you—just follow the steps and start earning! 🚀

Available on Gumroad - Instant Download - 50% OFFER 🎉

Image of Quadratic

AI spreadsheet assistant for easy data analysis

Chat with your data and get insights in seconds with the all-in-one spreadsheet that connects to your data, supports code natively, and has built-in AI.

Try Quadratic free

Top comments (0)

5 Playwright CLI Flags That Will Transform Your Testing Workflow

  • 0:56 --last-failed
  • 2:34 --only-changed
  • 4:27 --repeat-each
  • 5:15 --forbid-only
  • 5:51 --ui --headed --workers 1

Learn how these powerful command-line options can save you time, strengthen your test suite, and streamline your Playwright testing experience. Click on any timestamp above to jump directly to that section in the tutorial!

👋 Kindness is contagious

If this article connected with you, consider tapping ❤️ or leaving a brief comment to share your thoughts!

Okay