Using the following code, I am trying to clear the call log from our phone provider web application to enter information into my Ruby on Rails application.
desc "Import incoming calls" task :fetch_incomingcalls => :environment do
As you can see from the last five lines, I checked that "puts page.body" works successfully, and the code above works. He successfully logs in, and then moves on to call logs, followed by incoming calls. The incoming call table is as follows:
| Timestamp | Source | Destination | Duration | | 03 Jan 13:40 | 12345678 | 12345679 | 00:01:01 | | 03 Jan 13:40 | 12345678 | 12345679 | 00:01:01 | | 03 Jan 13:40 | 12345678 | 12345679 | 00:01:01 | | 03 Jan 13:40 | 12345678 | 12345679 | 00:01:01 |
What is generated from the following code:
<thead> <tr> <td>Timestamp</td> <td>Source</td> <td>Destination</td> <td>Duration</td> <td>Cost</td> <td class='centre'>Recording</td> </tr> </thead> <tbody> <tr class='o'> <tr> <td>03 Jan 13:40</td> <td>12345678</td> <td>12345679</td> <td>00:01:14</td> <td></td> <td class='opt recording'> </td> </tr> </tr> <tr class='e'> <tr> <td>30 Dec 20:31</td> <td>12345678</td> <td>12345679</td> <td>00:02:52</td> <td></td> <td class='opt recording'> </td> </tr> </tr> <tr class='o'> <tr> <td>24 Dec 00:03</td> <td>12345678</td> <td>12345679</td> <td>00:00:09</td> <td></td> <td class='opt recording'> </td> </tr> </tr> <tr class='e'> <tr> <td>23 Dec 14:56</td> <td>12345678</td> <td>12345679</td> <td>00:00:07</td> <td></td> <td class='opt recording'> </td> </tr> </tr> <tr class='o'> <tr> <td>21 Dec 13:26</td> <td>07793770851</td> <td>12345679</td> <td>00:00:26</td> <td></td> <td class='opt recording'> </td> </tr> </tr>
I am trying to decide how to select only those cells that I want (Timestamp, Source, Destination and Duration) and display them. Then I can worry about outputting them to the database, and not to Terminal.
I tried using a selector gadget, but it just shows "td" or "tr: ββnth-child (6) td, tr: nth-child (2) td" if I select several.
Any help or pointers would be appreciated!
source share