Global timeout

Class library usage, coding and language questions.
BCTest
Posts: 126
Joined: Tue Jun 03, 2014 10:15 am
Location: Hamburg, Germany

Global timeout

Post by BCTest » Thu Jan 04, 2024 8:58 am

Hello,

I have a general question: Is there a global timeout for recordings or actions?

I unintentionally wrote a test that attempts to write into an input field while a modal dialog is displayed above this edit field. Ranorex's PressKey method appears to wait for the modal dialog to disappear (indefinitely, I assume).

Is there a global timeout that can mark such long waiting times as errors?

Regards,
BCTest

dhale
Posts: 84
Joined: Thu Feb 27, 2014 7:33 pm

Re: Global timeout

Post by dhale » Fri Jan 05, 2024 8:56 pm

Few suggestions to consider:
regarding "while a modal dialog is displayed above this edit field" <-- consider using a popupwatcher to dismiss the modal?

regarding delay: Delays are not a good way of handling things in general. Its best to check properties and handle situations accordingly. You may want to check the properties of the input field, and inspect the enabled property while the modal is visible - if enabled is false while the modal is displayed, you could then add a check for enabled into the repository item repo path such that it includes [@enabled='true'] - then do a waitforexists() on the item - which has a timeout param that will allow you to fail out as you requested.