This is a migrated thread and some comments may be shown as answers.

Controls in IEDialog

3 Answers 80 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
swati bhat
Top achievements
Rank 1
swati bhat asked on 14 Jul 2010, 12:41 AM
Hey,

I am not able to get the controls on a Dialog whihc is invoked on clicking on Button from SL web application.
I am able to open and close the dialog with the below code but when i try to find the control using Find method of ActiveBrowser it gives exception. Can anyone please help me on how I can get access to the controls inside this IEDialog. I am also not able to get access to RadEditorControl.

 

 

 

app.Find.ByName<ToggleButton>("LocationPickerButton").User.Click(); 
        // ** Special IE Code. Given that IE Dialog is an IE specific feature. 
        if (ActiveBrowser.BrowserType == BrowserType.InternetExplorer) 
        
            InternetExplorerActions ieActions = (InternetExplorerActions)ActiveBrowser.Actions; 
            // Connect the dialog 
            ieActions.ConnectIEDialog("Select Location", 300);                 
            ActiveBrowser.Find.ByName<HtmlButton>("Find").Click();
            ActiveBrowser.Close();

3 Answers, 1 is accepted

Sort by
0
Missing User
answered on 14 Jul 2010, 10:08 PM
Hi swati,

From what I understand, it is a Windows Win32 dialog that is being launched. If this is the case, please see this documentation under the 'Handling IE Modal Dialogs' sub topic heading.

If it is a difference type of popup, please reply back if it is a browser, modal, or Silverlight child/popup window.

Kind regards,
Nelson Sin
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
swati bhat
Top achievements
Rank 1
answered on 15 Jul 2010, 07:20 PM
Hi,

This is a IEDialog. I know this since w.r.t below code IsDialog returns True. The issue is that I am able to close and open this dialog but not getting to access controls inside the dialog. When I try to do a find it returns null.  Is this the right way to look for the controls?

 

   
  
if (ActiveBrowser.BrowserType == BrowserType.InternetExplorer) 
 {
InternetExplorerActions ieActions = (InternetExplorerActions)ActiveBrowser.Actions; 
ieActions.ConnectIEDialog("Select Location", 300); 
bool IsDialog = ActiveBrowser.IsIEDialog;
Element e1 = ActiveBrowser.Find.ByName("Edit"); 
  
   
  
  
  
}

 

0
Missing User
answered on 19 Jul 2010, 08:02 PM
Hi again swati,

So if you were referring to an IE browser modal popup window, in the same documentation under 'Handling IE Modal Dialogs' is what you would use.

It looks like you mostly have the code correct except for:

ieActions.("Select Location", 300);
Manager.WaitForNewBrowserConnect("TheDialogUrl.html", true, 10000);

Kind regards,
Nelson Sin
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
swati bhat
Top achievements
Rank 1
Answers by
Missing User
swati bhat
Top achievements
Rank 1
Share this question
or