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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:42:19+00:00 2026-05-25T11:42:19+00:00

@editLinks = $ie.link(:text => Edit, :class =>edit ).links @editLinks.each do |l| l.click end I

  • 0
@editLinks = $ie.link(:text => "Edit", :class =>"edit" ).links
@editLinks.each do  |l| l.click 
end

I have the above code which iterates through a set of links which are called “Edit”. When edit is clicked on the webpage, the text boxes become enabled and the user is able to type into them. There are different edit links for different textboxes. However, for some reason, the code is not iterating or giving me any errors. It just finishes the script without clicking any edit links. I’ve omitted the javascript onlcick stuff to show just the html. All the edit links on the webpage also have different ID’s.

<a id="EditLinkButton" class="edit"><strong>Edit</strong></a>
  • 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-25T11:42:19+00:00Added an answer on May 25, 2026 at 11:42 am

    After reading Get Elements By Attributes question, I’d suggest doing something like the following:

    @editLinks = $ie.links
    @editLinks.each do |link|
      if link.attribute_value("class") == "edit" and link.text == "Edit"
        link.click
      end
    end
    

    There’s probably a better way of doing this, but it works.

    Edit:

    After reading your comment below, perhaps something along the lines of this would be better

    @edit_ids = %w(your edit link ids seperated by whitespace)
    @edit_ids.each do |edit_id|
      $ie.link(:id => edit_id).click
      # whatever else you're doing
    end
    

    So that way you’re looking them up in the DOM as and when you need them, rather than storing them and then their references becoming obsolete as the page changes during the test. Worth a shot.

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

Sidebar

Related Questions

I use this javascript to edit text in place: http://josephscott.org/code/javascript/jquery-edit-in-place now I need to
I have some link elements which are dynamically added and hidden from the page.
I have the following that is created dynamically: <a class=editLink href=/location/Edit?city=05>Edit</a> This and other
I have the following HTML: <tr> <td class=ui-widget-content> <a title=Edit href=/Administration/Menus/Edit/001W class=editLink ui-button ui-widget
I have a <code>rich:extendedDataTable</code>. Each row has a a4j:commandLink as below. Table Page: <a4j:commandLink
I have an edit button which appears on the page when users have access
As admin, Drupal has a ton of little hoverable 'edit' links. Is there an
I've got a basic table listing rows from a database, with edit links beside
I have the following @Html.ActionLink(Edit, EditProg, new { id = item.ID }) I like
I'm trying to add a rel=lightframe attribute to all my 'edit' links within my

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.