0
<td class="datepickerSelected">
<a href="#">
<span>21</span>
</a>
</td>
<td class="">
<a href="#">
如何獲取變量中的csscount/xpath計數並增加計數以指向下一個位置。如何存儲xpath計數並使用硒增加IDE
<td class="datepickerSelected">
<a href="#">
<span>21</span>
</a>
</td>
<td class="">
<a href="#">
如何獲取變量中的csscount/xpath計數並增加計數以指向下一個位置。如何存儲xpath計數並使用硒增加IDE
您可以使用storeXpathCount命令將計數存儲在變量中。 (Ref:http://software-testing-tutorials-automation.blogspot.in/2013/06/using-storexpathcount-in-selenium-ide.html),然後使用帶有javascript {storedVars.MyVar ++;}字符串的存儲命令來增加變量的值。 (Ref:http://software-testing-tutorials-automation.blogspot.in/2013/07/steps-for-data-driven-testing-with.html)
雖然鏈接可能會回答問題,但最好還是在這裏發佈它的基本部分。這樣做會確保即使鏈接變爲非活動狀態,您的答案仍然有效。 – Harry
感謝您的幫助。 – sathiya
StoreXpathcount // div [@ class ='datepicker']/div/table/tbody/tr/td/table/tbody [2]/tr/td [@ class =''or @ class ='datepickerSaturday'or @class ='datepickerSunday']計數。我使用上面的代碼來獲取匹配格式的鏈接總數。 – sathiya