0
我有一些頁面上的3列,並有一個按日期排序頁面上的排序按鈕。我一直在努力弄明白,沒有運氣。以下是一條記錄的例子。一頁上可能有50個。排序硒對象C# - 不是表
如何將所有三個「列」都放到一個數組中並按asc或desc順序對輸出進行排序?然後,我可以單擊排序值並獲取新的數組列表並進行比較。如果我做了一個findElements * .toList,它會給我一個所有行的列表,但我無法識別日期字段以進行排序。
我在想什麼?
|*444577233 444577233 (WORK 555.123.4567)* | *Voicemail (1 min 49 sec)* | *Apr 09, 2016 09:42 AM*|
<div class="full-mailbox-message alert alert-warning" style="display: none;">
<div id="message-list" class="message-list message-list-scroll">
<div class="list-item filterable message-item js-message-item cp " data-id="9408">
<span class="inline">
<input class="custom js-message-item-checkbox" type="checkbox">
<label></label>
</span>
<span class=" " data-id="9408">
<i class="message-list-icon icon-voice-mail custom-icon"></i>
<span class="sender" data-phone="5555551759" title="CONPORT 010,CR3522">CONPORT 010,CR3522 (555.555.1759)</span>
<span class="time" title="Apr 08, 2016 07:30 PM">Apr 08, 2016 07:30 PM</span>
<span class="summary">
<span class="text"> Voicemail (57 sec) </span>
</span>
</span>
</div>
<div class="list-item filterable message-item js-message-item cp " data-id="8592">
<span class="inline">
<input class="custom js-message-item-checkbox" type="checkbox">
<label></label>
</span>
<span class=" " data-id="8592">
<i class="message-list-icon icon-voice-mail custom-icon"></i>
<span class="sender" data-phone="5555551759" title="CONPORT 010,CR3522">CONPORT 010,CR3522 (555.555.1759)</span>
<span class="time" title="Mar 28, 2016 08:31 PM">Mar 28, 2016 08:31 PM</span>
<span class="summary">
<span class="text"> Voicemail (7 sec) </span>
</span>
</span>
</div>
<div class="list-item filterable message-item js-message-item cp " data-id="8523">
<span class="inline">
<input class="custom js-message-item-checkbox" type="checkbox">
<label></label>
</span>
<span class=" " data-id="8523">
<i class="message-list-icon icon-voice-mail custom-icon"></i>
<span class="sender" data-phone="5555551754" title="CONPORT 005,CR3522">CONPORT 005,CR3522 (555.555.1754)</span>
<span class="time" title="Mar 27, 2016 11:45 PM">Mar 27, 2016 11:45 PM</span>
<span class="summary">
<span class="text"> Voicemail (7 sec) </span>
</span>
</span>
</div>
<div class="list-item filterable message-item js-message-item cp " data-id="8477">
<span class="inline">
<input class="custom js-message-item-checkbox" type="checkbox">
<label></label>
</span>
<span class=" " data-id="8477">
<i class="message-list-icon icon-voice-mail custom-icon"></i>
<span class="sender" data-phone="withheld" title="Identity withheld">Identity withheld (withheld)</span>
<span class="time" title="Mar 24, 2016 03:51 AM">Mar 24, 2016 03:51 AM</span>
<span class="summary">
<span class="text"> Voicemail (1 sec) </span>
</span>
</span>
</div>
<div class="list-item filterable message-item js-message-item cp " data-id="8470">
<span class="inline">
<input class="custom js-message-item-checkbox" type="checkbox">
<label></label>
</span>
<span class=" " data-id="8470">
<i class="message-list-icon icon-voice-mail custom-icon"></i>
<span class="sender" data-phone="withheld" title="Identity withheld">Identity withheld (withheld)</span>
<span class="time" title="Mar 22, 2016 09:59 PM">Mar 22, 2016 09:59 PM</span>
<span class="summary">
<span class="text"> Voicemail (4 sec) </span>
</span>
</span>
</div>
<div class="list-item filterable message-item js-message-item cp " data-id="7191">
<span class="inline">
<input class="custom js-message-item-checkbox" type="checkbox">
<label></label>
</span>
<span class=" " data-id="7191">
<i class="message-list-icon icon-voice-mail custom-icon"></i>
<span class="sender" data-phone="withheld" title="Identity withheld">Identity withheld (withheld)</span>
<span class="time" title="Mar 04, 2016 04:53 AM">Mar 04, 2016 04:53 AM</span>
<span class="summary">
<span class="text"> Voicemail (4 sec) </span>
</span>
</span>
</div>
<div class="list-item filterable message-item message-unread js-message-item cp " data-id="7074">
<span class="inline">
<input class="custom js-message-item-checkbox" type="checkbox">
<label></label>
</span>
<span class=" " data-id="7074">
<i class="message-list-icon icon-voice-mail custom-icon"></i>
<span class="sender" data-phone="5555551756" title="cert 1756">cert 1756 (555.555.1756)</span>
<span class="time" title="Mar 03, 2016 09:03 AM">Mar 03, 2016 09:03 AM</span>
<span class="summary">
<span class="text"> Voicemail (4 sec) </span>
</span>
</span>
</div>
感謝Buaban。當我回家時,我會在今晚看看這個。我玩了幾分鐘,即使我只有3行,sortRows和rows在計數中返回113,它看起來像在項目數組中的重複很多,我不知道爲什麼。在行和排序行上運行AreEqual失敗。對幫助非常感謝。我從來沒有見過這個過程,它絕對是很酷的。 – Dazed
@Dazed你可以發佈完整的HTML源代碼嗎?所以我可以找出什麼應該是行定位器。 – Buaban
當我今晚回到家時,我會添加它。謝謝您的幫助。 – Dazed