Im new to watir and running scripts from it. Just want to ask if how can I get or extract the error messages Scite displays on the left panel and import it to a textfile? or is it really possible to do? Thanks.
我是watir的新手并从中运行脚本。只想询问我是如何获取或提取错误消息Scite在左侧面板上显示并将其导入文本文件?或者它真的可以吗?谢谢。
2 个解决方案
#1
2
I am not sure how would you do it from Scite, but if you execute Watir script from command line, you can redirect output to file:
我不确定你会如何从Scite中执行此操作,但如果从命令行执行Watir脚本,则可以将输出重定向到file:
$ ruby watir_script.rb > results.txt
If you use test framework like RSpec, there are a lot of options for storing test results in files.
如果您使用像RSpec这样的测试框架,那么有很多选项可以将测试结果存储在文件中。
#2
1
From Scite, you click in the output frame, Ctrl-A (to select all), Ctrl-C (to copy), then paste into what every application you like such as notepad.
从Scite中,单击输出框,Ctrl-A(全选),Ctrl-C(复制),然后粘贴到您喜欢的每个应用程序,如记事本。
I agree with Zeljko, you should use a good framework like rspec or testunit. Goodluck.
我赞同Zeljko,你应该使用像rspec或testunit这样的好框架。祝你好运。
#1
2
I am not sure how would you do it from Scite, but if you execute Watir script from command line, you can redirect output to file:
我不确定你会如何从Scite中执行此操作,但如果从命令行执行Watir脚本,则可以将输出重定向到file:
$ ruby watir_script.rb > results.txt
If you use test framework like RSpec, there are a lot of options for storing test results in files.
如果您使用像RSpec这样的测试框架,那么有很多选项可以将测试结果存储在文件中。
#2
1
From Scite, you click in the output frame, Ctrl-A (to select all), Ctrl-C (to copy), then paste into what every application you like such as notepad.
从Scite中,单击输出框,Ctrl-A(全选),Ctrl-C(复制),然后粘贴到您喜欢的每个应用程序,如记事本。
I agree with Zeljko, you should use a good framework like rspec or testunit. Goodluck.
我赞同Zeljko,你应该使用像rspec或testunit这样的好框架。祝你好运。