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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T20:31:41+00:00 2026-06-05T20:31:41+00:00

I am trying to automate a block appearing on the website and comparing its

  • 0

I am trying to automate a block appearing on the website and comparing its content through CMS table.
The issue is I have managed to automate the block appearing on the UI but when I login as admin and try to save the content of the table in an array using iteration there where I fail to do it.

<table id="nodequeue-dragdrop" class="nodequeue-dragdrop sticky-enabled tabledrag-processed sticky-table">
<thead class="tableHeader-processed">
<tbody>
  <tr class="draggable odd">
    <td>
      <a class="tabledrag-handle" href="#" title="Drag to re-order">
      <a href="/car-news/moscow/new-text-1">New Text 1</a>
    </td>
    <td>
    <td>2012-06-06 10:24</td>
    <td style="display: none;">
    <td>
    <td>
    <td class="position">1</td>
  </tr>
  <tr class="draggable even">
    <td>
      <a class="tabledrag-handle" href="#" title="Drag to re-order">
      <a href="/car-news/new-cars/text-2">Text 2 </a>
    </td>
    <td>
    <td>2012-06-06 10:29</td>
    <td style="display: none;">
    <td>
    <td>
    <td class="position">2</td>
  </tr>
  <tr class="draggable odd">
    <td>
      <a class="tabledrag-handle" href="#" title="Drag to re-order">
      <a href="/car-news/new-cars/this-is-text-3">This is Text 3</a>
    </td>
    <td>
    <td>2012-06-05 12:55</td>
    <td style="display: none;">
    <td>
    <td>
    <td class="position">3</td>
  </tr>

The code that I am using is

@text = Array.new
  x = 1
  y = 0

  until x == 10
    y = x -1

   until y == x
    @text[y] = @browser.table(:id,'nodequeue-dragdrop').tbody.row{x}.cell{1}.link(:href =>/car-news/).text

    puts @text[y]
    y=y+1  
   end

  x=x+1
 end

The problem is the scripts runs successfully but even though i have set an iteration the script only reads the 1st element and displays it text and does not goto the 2nd 3rd…and so on elements.

  • 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-06-05T20:31:43+00:00Added an answer on June 5, 2026 at 8:31 pm

    Justin is headed the right direction with using ruby’s built in methods for iterating over collections. But consider this, If I am reading your code right, you know you are after the text from specific links, so why iterate over the rows when you could just make a collection of matching links?

    link_text_array = Array.new
    @browser.table(:id,'nodequeue-dragdrop').links(:href => /car-news/) do |link|
      link_text_array << link.text
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to automate my trigger process so that I don't have to
I am trying to automate data extraction from a website and I really don't
Im trying to automate video conversion with powershell and ffmpeg tool. Ffmpeg have detailed
I am trying to automate the login into a website to pull some info
I've been trying to automate tests on asynchronous requests but I haven't been able
I'm trying to automate the download of a file from a website. Normally to
I'm trying to automate the Google Docs login process, but the methods that I
I am trying to automate backups with duplicity , but when I test the
I'm trying to automate a server request to the client upon connection but I
I am trying to automate the install process for OpenMRS developers http://wiki.openmrs.org/display/docs/Step+by+Step+Installation+for+Developers I have

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.