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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T20:07:05+00:00 2026-05-23T20:07:05+00:00

I am trying to test a website which contains alot of javascript. Javascript does

  • 0

I am trying to test a website which contains alot of javascript.
Javascript does alot of opening new dialog to let user choose “yes” or “no”.
It also has a function to upon right clicking, it opens up a right click menu which contains many functions such as zip, delete etc.

In Selenium, I can use the Selenium IDE to login, click, and others, but I don’t know how to test those functions.

I’ve read there are codes I can write such as in Java to run the test, but I’m hoping to make it work by using the simple Selenium IDE if possible. If not, then can someone post a simple testing code which works to run java scripts? Such as click button -> javascript menu pops up -> click ok on the pop up.

Thank you very much.

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

    Right context menus can be a little tricky. I’d suggest making custom commands for the right click context menu. Add the code from this article to your custom user-extensions.js file.

    http://old.nabble.com/How-to-recognise-right-click-of-the-mouse-in-IDE-td14913052.html

    The parameters for these functions in these commands become the expected arguments of your Selenium IDE commands. If you really want to make it simple, you can just call your javascript functions in these custom user-extension commands. 🙂 That might be a bit lazy and isn’t truely testing what your right click is doing, but it would work.

    Option #1 – if using IDE:

    Specify the user-extensions.js file under Selenium IDE > Options (menu) > Options (menu option) > General Tab, then browse to your file under “Selenium Core Extensions”.

    Option #2 – if using Selenium RC Server:

    If you’re not using the IDE and using Selenium RC server with a client driver (like JUnit for example), you must specify the path of the *.js file with the -userExtensions parameter when you start the Selenium RC Server on the command line. But you said you just wanted to use the IDE, so I’d ignore this. It takes quite a bit of other setup to use the Selenium RC server.

    java -jar selenium-server.jar -userExtensions user-extensions.js

    =======================

    I’ve never done this before, so I made the following custom command (JavaScript function) in my custom user-extensions.js file, and it worked well for me. I had to exit and restart the IDE before it found it. For some reason, you type everything after the “do” in the “Command” field in the IDE. It looks like it also added a “customAlertAndWait” to the IDE as well.

    Code in user-extensions.js file:

    Selenium.prototype.doCustomAlert = function(sTarget, sValue) {
    alert(‘Target: ‘ + sTarget + ‘ … Value: ‘ + sValue);
    };

    Selenium IDE command details:

    Command: customAlert
    Target: custom alert target
    Value: custom alert value

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

Sidebar

Related Questions

Im trying to test my successfully creates a new user after login (using authlogic).
I'm trying to get the country from which the user is browsing the website
I am writing an ASP.NET website, which is a new framework for me. I
I'm trying to learn how to use HTMLUnit in order to test some website's
I have provided the test website link below: http://www.naughtyfancydress.com/html/outfit.html I am trying to integrate
I'm trying to get a website working on my test environment, but somehow it
just trying to test for equality in this piece of code, but getting a
I trying to test an AccountController that uses DotNetOpenAuth but I am running into
I'm trying to test the DB2 adapter for BizTalk 2006 (not R2). While trying
I am trying to test the likelihood that a particular clustering of data has

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.