we noticed some strange behavior for the last tests, first some explanations:
- * our tests will be executed one by one
* the whole test-run lasts about 12 hours, it starts most of the days at about 17:00 and some days at about 14:00, but it differs any day
* during the whole test-run in some test-cases the correct use of the current date will be checked
* the following behavior problem could be reproduced using Ranorex 5.4.4 and 5.4.2 on Win 7 SP1
Since this change we noticed a strange behavior: when the delay is more than 13 minutes (it could be also 10 minutes?) Ranorex seemed not to be able to focus on the correct windows any more. Each test-case after this delay failed because the key-sequence were not sent to the correct dialog or the buttons won't be clicked.
Starting a program using RunApplication worked each time but none of the following actions:
- * Activate windows
* Focus windows
* Click on windows-title
* CloseApllication
And last: when we started the tests earlier and no date change occurred while executing all test-cases worked fine.
This is the code to activate and focus the program:
public void BeendeCOL() { const int verzoegerung = 5; int zaehler = 0; Report.Screenshot("COL wird beendet", repo.NemoMain.Self); do { if (repo.NemoMain.SchliessenInfo.Exists()) { Report.Info("TIS", "Einfacher Maus-Links-Klick auf die Titelzeile der COL"); repo.NemoMain.Titel.Click(); Report.Info("TIS", "COL wird aktiviert"); repo.NemoMain.Self.Activate(); Report.Info("TIS", "COL erhält Fokus"); repo.NemoMain.Self.Focus(); Report.Screenshot("Einfacher Maus-Links-Klick auf Schließen-Taste", repo.NemoMain.Schliessen, true); repo.NemoMain.Schliessen.Click(); } Report.Info("TIS", string.Format("Warte {0} Sekunden auf Ende von TIS: {1}. Versuch", verzoegerung, ++zaehler)); Delay.Seconds(verzoegerung, false); } while ((repo.NemoMain.SelfInfo.Exists()) && (zaehler < 12)); Validate.AreEqual(repo.NemoMain.SelfInfo.Exists(), false, "COL beendet"); }And so it looks like for each repeat till the counter counts to 12: the button wasn't clicked.