Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

160
Views
How can I click a link of the first [td] based on staus of last [td] in the same [tr] using codeceptjs/javasrcipt

The expected: Select random one an assignment has status "Not start". Here is my table:

    <table id="table1">
     <tbody>
      <tr class="odd1">
       <td>
        <a href="#" class="click_link"> Assignment 1 </a>
       </td>
       <td class="status">
        In Progress
       <td>
      </tr>
      <tr class="odd2">
       <td>
        <a href="#" class="click_link"> Assignment 2 </a>
       </td>
       <td class="status">
        Not start
       <td>
      </tr>
      <tr class="odd1">
       <td>
        <a href="#" class="click_link"> Assignment 3 </a>
       </td>
       <td class="status">
        Not start
       <td>
      </tr>
      <tr class="odd1">
       <td>
        <a href="#" class="click_link"> Assignment 4 </a>
       </td>
       <td class="status">
        Not start
       <td>
      </tr>
     </tbody>
    </table>

Solution: I group [td] elements have status "Not Start" in the array, then get the parent [tr] of the first [td][0]. Finally, from [tr] I find and click the link. How to do this? Thanks a lot!

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Worked with jquery:

I.executeScript(function() {
    var abc = $("#table1 td:contains('Not Start')").parent("tr").children("td:first").children().text();
    return abc;
    });
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!