jQuery UI选项卡未显示在TestNG报告中

学生

我试图将jQuery UI选项卡效果添加到我的TestNG报告中。当我使用reporter.log添加它时,jQuery UI选项卡显示在index.html报告中,该报告显示了测试套件中的所有测试。在此处输入图片说明您可以在上图中看到它的工作原理。我使用report.log(“ jquery脚本和代码在这里”)来做到这一点。它为每个测试步骤添加此表。我可以单击链接,它将显示正确的选项卡。

但是,当我在test-output文件夹中打开特定测试的测试报告时,jQuery UI效果不再起作用。

在此处输入图片说明

^此文件夹包含两个html报告,因为我的测试套件中有两个测试。

在此处输入图片说明 ^这是其中一项测试的报告页面。

在此处输入图片说明

^当我单击显示输出时,会发生这种情况

您可以看到它实际上正在显示所有内容,但是jQuery UI效果不再起作用。为什么是这样?这是我用来添加jQuery UI效果的代码。

//Report.log adds jqueryui script +css, and adds a fancy way to show test results with tabs
        Reporter.log("<script src=\"http://code.jquery.com/ui/1.11.2/jquery-ui.js\"></script>");
        Reporter.log("<link rel=\"stylesheet\" href=\"http://code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css\">");
        Reporter.log("<script> $(function() { $( \".tabs\" ).tabs(); }); </script>");
学生

好的,看来我忘了添加jQuery库本身。结案!

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章