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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T19:32:17+00:00 2026-06-09T19:32:17+00:00

The webpage has a nested frame structure. The frame FCCBMain is nested in frame

  • 0

The webpage has a nested frame structure. The frame FCCBMain is nested in frame Main. I can access it this way:

 browser.frame(:id => "FCCBMain").frames[0]
 => #<Watir::Frame:0x504e155578d49f34 located=false selector={:index=>0}>
 browser.frame(:id => "FCCBMain").frames[0].id
 => "MainLeft"

But not this way:

 brwoser.frame(:id => "FCCBMain").frame(:id => "MainLeft").id
 Selenium::WebDriver::Error::StaleElementReferenceError: Element belongs to a different frame than the current one - switch to its containing frame to use it
from [remote server] resource://fxdriver/modules/web_element_cache.js:5634:in `unknown'
from [remote server] file:///tmp/webdriver-profile20120816-21551-1a8xyvv/extensions/fxdriver@googlecode.com/components/driver_component.js:5329:in `unknown'
from [remote server] file:///tmp/webdriver-profile20120816-21551-1a8xyvv/extensions/fxdriver@googlecode.com/components/driver_component.js:6623:in `unknown'
from [remote server] file:///tmp/webdriver-profile20120816-21551-1a8xyvv/extensions/fxdriver@googlecode.com/components/command_processor.js:9924:in `unknown'
 ...

I thought these two ways are very similar. Why doesn’t the later work?

(if it helps, here is the webpage I’m working on)

  • 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-09T19:32:18+00:00Added an answer on June 9, 2026 at 7:32 pm

    First I think you have a typo with “brwoser.frame”

    Second if you are going to access the frames with the chain you have to include ALL frames and framesets in the path IE: browser.frame(:id => “FCCBMain”).frameset.frameset.frame(:id => “MainLeft”).id

    The reason your second solution was not working is because it was looking for an immediate child of frame(FCCBMain) to have the id of “MainLeft”. Frame(FCCBMain) only has a frameset child and the frameset does not have an ID. If the frameset had an ID of “MainLeft” AND was a frame(not a frameset) then the line, browser.frame(:id => “FCCBMain”).frame(:id => “MainLeft”).id, would work.

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

Sidebar

Related Questions

I can't access the Datastore Admin tab due to a This webpage has a
I have a webpage which has tab list, the HTML looks like this for
I'm very new to JavaScript, and I have a webpage with 3 nested frames
I have access for only to a front end of a webpage. This webpage
I have a nested ListView on my ASP.NET Webpage, the inner ListView has an
I'm getting a webpage has a redirect loop error. Most likely this is due
What is the best way to handle attachments in RavenDB? A webpage has an
I have a webpage that has a comment box that can be toggled by
The webpage has the following source (only copied the important part): <h1>Relatórios</h1> <div id=textmenu>
My webpage has a large image (a map). I want to position, at the

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.