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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:00:46+00:00 2026-05-14T20:00:46+00:00

I have a page (index.html) which has a frame: <html> <body> <iframe src=otherPage.html />

  • 0

I have a page (index.html) which has a frame:

<html>
<body>
<iframe src="otherPage.html" />
</body>
</html>

And the otherPage.html has the contents:

<html>
<head><link src="jquery-min.js" type="text/javascript" /></head>
<body><div id="main">Contents</div></body>
</html>

I am attempting to use the following selenium code on index.html:

selenium.open("index.html");
selenium.selectFrame("//iframe");
selenium.getEval("window.jQuery('div[id=main]')");

However this fails miserably. It says that the jQuery object doesn’t exist.

If I attempt to execute the selenium test on the otherPage like so:

selenium.open("otherPage.html");
selenium.getEval("window.jQuery('div[id=main]')");

everything is hunky dory.

Right now this is pseudo code, if people want me to make it compile I’ll do that and put it on github.

  • 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-14T20:00:47+00:00Added an answer on May 14, 2026 at 8:00 pm

    Selenium stores the Window Object within its own object so it can manipulate it better. Once you move to the frame it should be like this.

    selenium.getEval("var window = this.browserbot.getUserWindow();window.jQuery('div[id=main]')");
    

    And that should work for you

    I have a tutorial on my site for this type of situation here

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

Sidebar

Related Questions

i shall state my problem here.. I have an index.html page which has a
I have an index.html which has JavaScript: byId(p).value = page; byId(nav_container).focus(); document.forms[nav_form_main].submit(); The focus
I am using jQuery for a simple website and have a main page 'index.html'
I have an Iframe inside of a page that has the src set to
I have a form on my index.html page which makes a POST request to
I have a page called index.html which takes in a few variable from the
I have a page in HTML(index.html), and a folders named images, css, js that
I am using rails beta 3 and I have a erb page named index.html.erb
I have the following jQueryMobile page anatomy at index.html: <div data-role=page> <div data-role=header>...</div> <div
If I have a single page with many forms of existing records: index.html.haml -

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.