List Icon
Archive de la liste de diffusion

La liste de diffusion est fermée depuis juillet 2022, mais sert toujours d'archive d'informations sur QF-Test.
Cependant, si vous souhaitez rester informé des nouveautés concernant QF-Test, vous pouvez simplement vous abonner à la newsletter :
abonner à la newsletter 


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[QF-Test] Reading a log file while it is being written


  • Subject: [QF-Test] Reading a log file while it is being written
  • From: "Fabiola Ruiz" <fabiola.ruiz@?.com>
  • Date: Wed, 22 Jan 2014 12:34:01 -0500 (EST)

Hello,

I am running a program using QFTEST which creates a log file that is automatically opened by the program. I would like QFTEST to read this log while it is being written since I need it to take a screenshot when certain text line appears. I have this SUT script but it is not working:

rc.setLocal("checkOk", "false")
def com = rc.getComponent("log_file_component")
def text = com.getX()
def m = (text =~ /text_line/)
if (m.matches()) {
   rc.setLocal("checkOk", "true")
}


I am new to Groovy and I would really appreciate any help!

Thanks in advance,

Fabiola