An unexpected error ... while loading the log file.

Bug reports.
OMEGASquad
Posts: 4
Joined: Tue Nov 03, 2009 5:33 pm

An unexpected error ... while loading the log file.

Post by OMEGASquad » Tue Nov 03, 2009 5:42 pm

Hi, the problem is, that the Ranorex executable does not log the GUI test correctly.
Additionally, Ranorex Studio provides the "Unexpected Error" as can be seen in the screenshot attached to this post.

I somehow realize, that indeed the path is a little (too?) long, which could be the cause for the exception. On the other hand, why does RX Studio require a file with extension *.rxlog.svn-base?

What I reckoned was, that the date of the "Test.rxlog" file is updated with each test. However, though there is an error in the GUI, the test script does not log that incident into the "Test.rxlog" file.

Does anyone have a feeling of what could be the problem here?
You do not have the required permissions to view the files attached to this post.

User avatar
Ciege
Posts: 1336
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: An unexpected error ... while loading the log file.

Post by Ciege » Tue Nov 03, 2009 6:27 pm

It is showing an access denied error message. Are you sure your current user has valid access credentials to that path?
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

OMEGASquad
Posts: 4
Joined: Tue Nov 03, 2009 5:33 pm

Re: An unexpected error ... while loading the log file.

Post by OMEGASquad » Wed Nov 04, 2009 10:03 am

Thanks for the hint - indeed, there was a write protection on that file. Removing the write protection solved the unexpected error.

Two questions remain:

First Question:
I did not create the file on my own and neither did I write-protect it. Could it be possible, that Ranorex did that on its own and that the problem was self-induced?

Second Question:
Unfortunately, Ranorex still does not recognize that the sequence could not be ended succesfully due to an (intentionally) invoked error.
Is that intended? I expected an error log that the sequence could not be followed to the end, because dialog xyz did not pop up. With the missing dialog, the whole test is invalid.

User avatar
Ciege
Posts: 1336
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: An unexpected error ... while loading the log file.

Post by Ciege » Wed Nov 04, 2009 4:03 pm

1) Not sure why (or if) Ranorex placed a write protect on that file. You can try telling Ranorex to point to a different log file each time. I.e. time/date stamped file. This is a good thing to do regardless so that you can keep a backlog of all you test logs. Use the Report.Setup command in your code to tell Ranorex what logfile you want to use:

Code: Select all

Report.Setup(ReportLevel.Debug, LogFile, true);
2) Not sure I can answer question 2 without seeing your code. Are you specifically telling Ranorex to look for a dialog box at a given time and issue a pass/fail depending on if it finds that dialog or not? Can you post a snippet of your code where you expect to catch this missing dialog?
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

OMEGASquad
Posts: 4
Joined: Tue Nov 03, 2009 5:33 pm

Re: An unexpected error ... while loading the log file.

Post by OMEGASquad » Wed Nov 04, 2009 5:31 pm

Hm, I think you answered my question - I did not know that I need to explicitly check for existence of the dialog box. I thought that if the button of the dialog box could not be clicked (because it did not show up), Ranorex will automatically notify that the input event could not be performed.

However, I can implement the check, so thanks for the hint.

Concerning the log: I was just confused because of the *.rxlog.svn-base extension. Next time I know how to handle this issue (i.e. read the error message and fix the problem :) )

Thanks a lot so far.
Kind regards,
Christian

User avatar
Ciege
Posts: 1336
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: An unexpected error ... while loading the log file.

Post by Ciege » Wed Nov 04, 2009 5:37 pm

Well, Ranorex "shoud" throw an exception if it is unable to click a button you requested. Are you catching exceptions in your code in a Try/Catch block?
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: An unexpected error ... while loading the log file.

Post by Support Team » Wed Nov 04, 2009 7:25 pm

Just want to add my two cents to the log file issue:
It seems you checked in a log file inside your project directory. SVN creates a hidden directory that stores the orginal version of the checked in files in order to check whether you changed those files locally. Those original files get the extension ".svn-base".
If you then run a Ranorex application that uses the same log file name as the checked in log file, Ranorex falsely thinks that the file in the hidden SVN directory belongs to the currently generated report and tries to copy the .svn_base file to the Reports folder. That works the first time, however, as the hidden SVN files are readonly, the second copy action fails because the file in the Reports folder cannot be overwritten.

To make a long story short: That's a bug, Ranorex should not copy files in subdirectories, only files that really relate to the currently generated report (like images). We will fix this issue for the next version.

Meanwhile, please, don't use a log file name that's equal to an already checked in log file or do not check in log files inside the project directory or a sub directory of the project!

Regards,
Alex
Ranorex Support Team

OMEGASquad
Posts: 4
Joined: Tue Nov 03, 2009 5:33 pm

Re: An unexpected error ... while loading the log file.

Post by OMEGASquad » Thu Nov 05, 2009 10:08 am

Hi,

thank you for your feedback - good to know that you are already concerned with the log file thingy.

Concerning the exception - you are right, I will revise my test and it should work then.