popup window

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
omayer
Posts: 458
Joined: Thu Oct 28, 2010 6:14 pm

popup window

Post by omayer » Wed Nov 07, 2012 10:45 pm

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();
}
Tipu

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

Re: popup window

Post by Support Team » Thu Nov 08, 2012 2:44 pm

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)

omayer
Posts: 458
Joined: Thu Oct 28, 2010 6:14 pm

Re: popup window

Post by omayer » Thu Nov 08, 2012 9:21 pm

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();
}
You do not have the required permissions to view the files attached to this post.
Tipu

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

Re: popup window

Post by Support Team » Fri Nov 09, 2012 10:18 am

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)