Page 1 of 1

popup window

Posted: Wed Nov 07, 2012 10:45 pm
by omayer
when i call this method, debugger screen hang , doesn't generate any error or any action


static void CheckForWarningDialog()
{
Ranorex.Button button=null;
if (Host.Local.TryFindSingle("/form[@title='Windows explorer']/button[@text='OK']", 1000, out button))
button.Click();
}

Re: popup window

Posted: Thu Nov 08, 2012 2:44 pm
by Support Team
Hello,

It looks like that your form is not availabe:
omayer wrote:/form[@title='Windows explorer']
Could you identify this form with 'Ranorex Spy' correctly?

Regards,
Markus (T)

Re: popup window

Posted: Thu Nov 08, 2012 9:21 pm
by omayer
same result after using correct path from xpy , please see attached rxsnap

static void CheckForWarningDialog()
{
Ranorex.Button button=null;
if (Host.Local.TryFindSingle("/form[@title='Windows Internet Explorer']/button[@text='OK'],5000, out button))
button.Click();
}

Re: popup window

Posted: Fri Nov 09, 2012 10:18 am
by Support Team
Hello,

It seems that you have missed a double quote (") at the end of your line:
"/form[@title='Windows Internet Explorer']/button[@text='OK']
You could use the following lines of code:
static void CheckForWarningDialog()
{
Ranorex.Button button=null;
if (Host.Local.TryFindSingle("/form[@title='Windows Internet Explorer']/button[@text='OK']",5000, out button))
button.Click();
}
Regards,
Markus (T)