String TC_Status =“PASS”;
如何在html
的td标记中传递TC_Status值“PASS” File f = new File("source.htm");
BufferedWriter bw = new BufferedWriter(new FileWriter(f));
bw.write("<html>");
bw.write("<body>");
bw.write("<table cellspacing="+50+">");
bw.write("<tr>");
bw.write("<td>S.No</td>");
bw.write("<td>TestCaseDescription</td>");
bw.write("<td>Status</td>");
bw.write("<td>Screenshot</td>");
bw.write("</tr>");
bw.write("<tr>");
bw.write("<td>1</td>");
bw.write("<td>Login</td>");
bw.write("<td></td>"); ---------------------------------- HERE PASS is to be displayed
bw.write("<td></td>");
bw.write("</tr>");
bw.write("</table>");
bw.write("</body>");
bw.write("</html>");
bw.close();
请帮助完成这项工作
答案 0 :(得分:1)
这应该有效
bw.write("<td>"+TC_Status+"</td>");