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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T11:49:15+00:00 2026-05-24T11:49:15+00:00

How can I automate clicking this anchor tag with Selenium IDE (in Mozilla Firefox

  • 0

How can I automate clicking this anchor tag with Selenium IDE (in Mozilla Firefox of course)? I tried two different approaches, and neither one worked. Would it matter that this is in a popup window? I can get other controls to work.

HTML:

<a href=”javascript:__doPostBack(‘EditTestResult$EditOverallTestResults$BucketMove$LBuSelect’,”)” class=”standard-text” id=”EditTestResult_EditOverallTestResults_BucketMove_LBuSelect”>-></a>

Selenium Code that didn’t work:

Command: clickAndWait
Target: id=EditTestResult_EditOverallTestResults_BucketMove_LBuSelect
Value:

Selenium Code that didn’t work:

Command: clickAndWait
Target: link=->
Value:

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

8/7/2011 update

So I got more information on this one. The command before this command is the following:

Command: addSelection
Target: id=idofmultiselect
Value: option1

When I start the script (keypress of “s”) on my “clickAndWait” command above, it works fine (for both versions). It’s when I have this multi-select selection when the IDE gets STUCK on the clickAndWait command. I’ve tried using “addSelectionAndWait” and that didn’t fix it.

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

8/8/2011 update

I can’t put the actual dynamic code in, so this will have to suffice.

<html>

<body>

<form>

<table cellpadding="0" cellspacing="0" border="0">
    <tr>
        <td><span id="EditTestResult_EditOverallTestResults_BucketMove_LblUnselectedBox">Does Not Have Results...</span><br>
            <select size="4" name="EditTestResult$EditOverallTestResults$BucketMove$LBoUnselected" multiple="multiple" id="EditTestResult_EditOverallTestResults_BucketMove_LBoUnselected" style="height:100px;width:220px;">
        <option value="214">Cocaine/Metabolite - Positive</option>

        <option value="213">Opiate - Positive</option>
        <option value="37">Phencyclidine - Positive</option>
        <option value="58">THC Metabolite - Positive</option>

    </select></td>
        <td vAlign="middle">
            <table>
                <tr>

                    <td><a id="EditTestResult_EditOverallTestResults_BucketMove_LBuSelect" class="standard-text" href="javascript:__doPostBack('EditTestResult$EditOverallTestResults$BucketMove$LBuSelect','')">-&gt;</a></td>
                </tr>
                <tr>
                    <td><a id="EditTestResult_EditOverallTestResults_BucketMove_LBuUnselect" class="standard-text" href="javascript:__doPostBack('EditTestResult$EditOverallTestResults$BucketMove$LBuUnselect','')">&lt;-</a></td>
                </tr>
            </table>
        </td>
        <td><span id="EditTestResult_EditOverallTestResults_BucketMove_LblSelectedBox">Has Results...</span><br>

            <select size="4" name="EditTestResult$EditOverallTestResults$BucketMove$LBoSelected" multiple="multiple" id="EditTestResult_EditOverallTestResults_BucketMove_LBoSelected" style="height:100px;width:220px;">
        <option value="206">Amphetamine - Positive</option>

    </select></td>
    </tr>
</table>


<script type="text/javascript">
//<![CDATA[
var theForm = document.forms['Form1'];
if (!theForm) {
    theForm = document.Form1;
}
function __doPostBack(eventTarget, eventArgument) {
    alert("doing postback");
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
//]]>
</script>

</form>

</body>
</html>

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

8/22/2011 update:

Discovered that ASP.NET validation can cause the clickAndWait command to implicitly fail. When running the script in Selenium, validation messages in the Selenium IDE don’t show like they do when using a web browser manually. So it may appear that the command fails, but in reality, the form couldn’t submit and you can’t see the red validation messages in the browser like you normally can when you manually click a button with your mouse (rather than having the clickAndWait command doing it). That fixed a bunch of my issues, but not this one. I’m still looking for an answer.

  • 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-24T11:49:18+00:00Added an answer on May 24, 2026 at 11:49 am

    The problem here is likely a synchronization one. If this is an AJAX, which it appears to be, then all the AndWait methods are useless to you.

    Try just using Click followed by WaitForElementPresent or something similar.

    AndWait will only work when there is a complete, physical page load in the browser. This looks like it is part of a much larger form and I would be surprised if that is happening given the code you provided.

    See also http://saucelabs.com/blog/index.php/2011/02/advanced-selenium-synchronization-with-latches/

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

Sidebar

Related Questions

I can make batch or vbs file on windows and run. this can automate
how can I automate finding the pagerank of a domain? I came across this
I asked this Can I automate creating a .NET web application in IIS? a
How can I pipe the new password to smbpasswd so I can automate my
Is there a good test suite or tool set that can automate website navigation
Renting houses can be nasty so I need to automate it. Please, have a
Can Selenium or any other automated tool check for the proper positioning of elements
Elsewhere on the Web, you can find recommendations on using something like this to
I'm using WebKitDotNet to simulate and automate a web browser. This is really nifty
Is there any API or tool that can automate software updating? It should take

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.