Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8451937
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:22:29+00:00 2026-06-10T11:22:29+00:00

I need to do an automated script that fills two text fields and clicks

  • 0

I need to do an automated script that fills two text fields and clicks a button on a web page, and stores all resulting text to a string variable.

I know how to do this with Watir, but the problem is that this script will be running on a Windows server (with no physical monitor attached).

So this needs some kind of “emulated browser” without actual browser window… I have never before done anything like this, but after google search I think that Ruby gems “mechanize” or “capybara” might be able to do the trick.

But because I don’t have any experience with either capybara or mehcanize, I’m asking a little help here…

Here is what I’m trying to do, written in Watir code. I would really appreciate it if someone could tell me how to do the same thing with either “mechanize” or “capybara”. Or, if there is some other way to do this, all suggestion are welcomed:

require "watir"
ie = Watir::Browser.new
ie.goto "http://www.vero.fi/vere/Tarkistus/VeronumeronTarkistus.aspx/"
ie.text_field(:id, "tbNimi").set "John Smith"
ie.text_field(:id, "tbVerotunnus").set "123456789012"
ie.button(:id, "btnHae").click
info = ie.text
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T11:22:31+00:00Added an answer on June 10, 2026 at 11:22 am

    You could also use Celerity. It drives headless browser using Watir API.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Anyone knows how i can add a anchor to a web page that will
I need to download some emails from my gmail. All that emails have same
I'm looking for a drop-in include script / class that dissects multipart/form-data and fills
I am building a Backbone app and I need to have automated tests. I
I need to automate a process that involves getting data from a series of
Update: I wrote a working script that finishes this job in a reasonable length
I have a home-grown automated build script in the form of a DOS batch
I am writing a Perl script that needs to transfer files between computers using
I'm working with a VB Script file written by someone else that uses Windows
I have different requirement from a customer to write a automated test script for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.