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 7874945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:54:00+00:00 2026-06-03T02:54:00+00:00

I just started using Watir to write some simple tests for my web application.

  • 0

I just started using Watir to write some simple tests for my web application.

First thing I want to do is to populate an login form with an email input element of type “email” with SafariWatir on OS X.

This won’t work:

browser.text_field(:id, "email").set('my@email.com')

Trace:

/Library/Ruby/Gems/1.8/gems/safariwatir-0.4.0/lib/safariwatir/scripter.rb:661:in `execute': Unable to locate TextField, using :id and "email" (Watir::Exception::UnknownObjectException)
    from /Library/Ruby/Gems/1.8/gems/safariwatir-0.4.0/lib/safariwatir/scripter.rb:303:in `focus'
    from /Library/Ruby/Gems/1.8/gems/safariwatir-0.4.0/lib/safariwatir.rb:525:in `set'
    from test.rb:10

I assume that the element is not matched because of the different type attribute value. The documentation does not state any specification for this kind of elements. Any ideas?

Thanks!

Update: adding (reformatted) HTML sample based on user’s comment that they are testing pinganalytics

<form action="http://pingalytics.com/" method="post" accept-charset="utf-8"> 
  <p>
    <label for="email">Email</label> 
    <input type="email" name="email" value="" id="email" autofocus=""  /> 
  </p>
  <p>
    <label for="password">Password</label>
    <input type="password" name="password" value="" id="password"  /> 
  </p>
  <input type="submit" name="login" value="Log in with Pingdom" class="primary" />
  <p>
    <a href="https://www.pingdom.com/signup/">
      Sign up
    </a>
    , or 
    <a href="https://pp.pingdom.com/index.php/login" title="Reset your Pingdom password">
      recover your password
    </a>
    .
  </p>
</form>
  • 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-03T02:54:01+00:00Added an answer on June 3, 2026 at 2:54 am

    the ’email’ type for an input element is new as of HTML5. Safariwatir is an older project which pretty much predates HTML5. It has not seen a lot of recent work and it is highly unlikely it would be looking for this type when searching for potential ‘text_field’ elements.

    Watir 3.0 or Watir-webdriver would be a safer bet as a lot of work has gone into those to bring them up to properly supporting HTML5.

    Also since Webdriver has just recently added support for Safari (see here for instructions), it is now a viable alternative to safariwatir (which I highly expect will see no further work going forward.)
    The Safari support is still a tiny bit DYI as you have to build your own safari extension and it only works on a Mac, but that may change if we see someone start publishing a standard safari extension that could be downloaded from an online gallery

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

Sidebar

Related Questions

I just got started running UI tests against my ASP.NET MVC application using WatiN.
I just started using Ext JS to build a relatively complex web application for
I just started using Qt and I wanted to debug my Qt application. Can
I just started using the chrome developer tools for some basic html websites and
I just started using Solrnet in my application only to discover that using the
I just started using Slick2D and learned how simple it is to load in
Just started using Java (for Android, if that matters) and all I want is
I just started using Hibernate on a new project, and with my first entity,
I just started using Coderush and found some stuff that I used to have
I just started using T4 templates and the first problem occured. When I try

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.