Knowledge Base Article

Home Page > Knowledge Base > Rapise

Home Page > Knowledge Base > Rapise > Rapise Desktop

Article How does Rapise detect if a dialog is already open?

by Adam S on Friday, February 20, 2015

There are several ways to find if something is already on the screen, this article explains some of the options.

First:

Use the Global.DoWaitFor(object_id, nnn);

-- This function may be used to wait for some object or to find an object. See Global.DoWaitFor.

So if you have some object (such as text label, button and so on) available for the current dialog you may 'wait' for it for small amount of time. If it is not found the the dialog does not exist. For example:

if(Global.DoWaitFor('Confirm_Label',1000)){ ...}

Second: Use the internal API available through g_util object:

var found = g_util.FindWindows('Error Message', 'regex:.*'); if(found.length==1) { // Actions if the window is found }
               
Attachments
Article Info
Last Updated: 2/20/2015
Article ID: KB135
# Views: 1234
Powered by KronoDesk v1.1.0.15 | © Copyright Inflectra Corporation 2011-2016 | Licensed to Inflectra Corporation.