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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T15:16:07+00:00 2026-05-25T15:16:07+00:00

Well i wanted to comment on watir-webdriver wait for page load>this topic but since

  • 0

Well i wanted to comment on watir-webdriver wait for page load>this topic but since i have 1 rep I cannot.

I’m upgrading my watir scripts to watir-webdriver and the first test i ran on Firefox yielded:

Selenium::WebDriver::Error::NoSuchElementError: Unable to locate element: {"method":"tag name","selector":"body"}

when all I was doing was logging into my app (which worked fine), clicking the Build Info link, and doing a:

@browser.text

This happened consistently. After reading on here, I put a sleep after the click and before the @browser.text and it worked. My conclusion is obviously that the Firefox driver is not waiting until the page is loaded before trying the

-> POST session/8607aaa2-d72d-448a-85e1-3f96a1766da1/element
{"value":"body","using":"tag name"}

So my question is is this an isolated incident (calling @browser.body, which is not an entirely typical call) or am I going to have to use waits? It seems the whole beauty of watir is lost if I cannot expect the driver to wait until the browser is in a ready state. Also, is there a dev google group or something like that for watir-webdriver? I have the feeling I’m going to see more and more issues (several with IE9). I’ll probably also ask on Alister’s blog (which rocks, btw).

  • 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-05-25T15:16:08+00:00Added an answer on May 25, 2026 at 3:16 pm

    Watir-WebDriver should wait until a page is ready, but the problem is so much content is dynamically generated, there really isn’t a every a clear definition of ready.

    This is where the waiting helper methods shine: http://watirwebdriver.com/waiting/

    Find an element you know you expect, and use something like:

    require 'watir-webdriver'
    b = Watir::Browser.start 'bit.ly/watir-webdriver-demo'
    b.select_list(:id => 'entry_1').wait_until_present
    

    Update:

    I think your problem is native events related. Try disabling native events

    profile = Selenium::WebDriver::Firefox::Profile.new
    profile.native_events = false
    b = Watir::Browser.new WEB_DRIVER, :profile => profile
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Lots of words below, sorry - but I wanted to explain this situation well:
Well, this is my first post here and really enjoying the site. I have
well i have this messages table with sample values like these: msg_id recipient_id read
This may seem like a basic/stupid/obviously-answered question, but I wanted to check: why use
I have this existing code which works very well. public static T SessionGet<T>(string key)
Well... simple question, right? But with no so simple answers. In firefox i use
Well, it seems simple enough, but I can't find a way to add a
Well this is incredibly frustrating. After being nagged by Rails that I need to
I wanted to comment on a question about interface design and I wanted opinions
I am asking this because I use Python, but it could apply to other

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.