我正在使用watir-webdriver,我試圖將下表中顯示的內容(速率代碼選擇不可用的本地或汽車138DE)寫入文本文件,但我無法讓它顯示內容。任何想法我做錯了什麼?在此先感謝您的幫助。Watir顯示來自文本文件中的表格的內容
errorMes = browser.select_list(:name => 'seamlessMessages').value
f3=File.open('Error Log - Conf Res.txt', 'a')
f3.puts "Cancel Reservation - FAILED - Res ID: " +tasid+" - " + CSAsite + " - Message: " +errorMes
f3.puts "\n"
f3.close
代碼
<TD><B>Error/Informational Messages</B></TD>
<TD><B>Number of Messages</B></TD>
<TD class="tableData"><span name="nbrOfMessages"/>1</span></TD>
<TD> </TD>
</TR>
<TR>
<TD height="1"></TD>
</TR>
</TABLE>
<TABLE width="100%" class="displaySubsection" cellpadding="0" cellspacing="0">
<TR>
<TD width="5" rowspan="3"></TD>
<TD width="800"></TD>
<TD width="5" rowspan="3"></TD>
</TR>
<TR>
<TD>
<select name="seamlessMessages" size="2" readonly tabIndex="-1" class="readonly wide"><option value="0" selected>RATE CODE SELECTED NOT AVAILABLE THIS LOCATION OR CAR 138DE </option></select>
</TD>
你是什麼意思「我無法顯示內容」? – 2012-08-13 12:04:39