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

  • Home
  • SEARCH
  • 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 6091457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T12:19:48+00:00 2026-05-23T12:19:48+00:00

I am a Selenium newbie … As a JavaScript programmer, I think I want

  • 0

I am a Selenium newbie …

As a JavaScript programmer, I think I want to handle JavaScript events in my Selenium-2 tests (JUnit). I am joining a team where all of the existing tests have “waitForSomethingToBeRendered” methods. Is there some way my Selenium tests can handle/listen for DOM (or custom) events?

Also, I’ve read on SO where developers use FireBug to write/debug Selenium-2 tests. How does this work? I don’t see FireBug in the browser launched by Selenium. Similarly, why does the following appear to have no effect? Am I trying something Selenium/JUnit does not support?

selenium().getEval("alert('hello');");
selenium().getEval("debugger;");
  • 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-23T12:19:49+00:00Added an answer on May 23, 2026 at 12:19 pm

    You don’t see the firebug extension because selenium opens a stripped firefox. I’m guessing the reason is it’s much faster. It’s possible (and quite easy in selenium-2) to add the plugin.

    The alert doesn’t work because selenium-1 (I don’t know how selenium-2 handles them) swallows the alerts. There’s an api for handling alerts.

    Plus, in selenium-1, the JS runs in a different window. So the equivalent of document.getElementById() is sel.getEval("selenium.browserbot.getCurrentWindow().document.getElementById()").

    Finally, I don’t know about events but you can wait for conditions: sel.wait_for_condition().

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

Sidebar

Related Questions

We are running Selenium regression tests against our existing code base, and certain screens
I'm using selenium-client to test a site. I want to get all a tags
I'm a complete selenium newbie. Where should I start if I want to learn
I've several Selenium tests and want to know their coverage (measured with Cobertura). I'm
With selenium can one run a test which check all images on a current
We've been using selenium with great success to handle high-level website testing (in addition
I'm using selenium to run some functional tests on the UI for our current
I'm using the Selenium Fitnesse Bridge Fixture in order to write tests in Fitnesse
I'm running Selenium tests from within Eclipse, but I can't load a custom Firefox
I'm writing some Selenium tests in Java, and I'm mostly trying to use verifications

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.