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

Problem handling windows dialogue's in firefox,safari browser

7 Answers 113 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mahendra Kumar
Top achievements
Rank 1
Mahendra Kumar asked on 28 Nov 2011, 11:50 AM
Hi,

I am using Webaii 2010.3.1421.0. Current I am running into a issue handling windows dialogue alerts in fire fox browser. I have the script developed using the IE 8 browser and it's working fine. I am trying to execute the same scripts against different browser's like fire fox, Safari and chrome.

When I executed the script on Firefox and Safari, script does handle the windows dialogue's and fails.
Attached is the screen shot for windows dialogue.
Code to handle the windows dialogue

  var altDlg = new TMSConfirmDialog(ActiveBrowser, DialogButton.OK, ExpectedDialogButtons.Two);
            Manager.DialogMonitor.AddDialog(altDlg);
            Manager.DialogMonitor.Start();
            PfmPageManager.HistoryPage.Elements.HistoryDataGrid.GoToDetailPage(" ", "Version", "Revert", versionNumber);
            string dialogMessage = altDlg.DialogMessage;

Any suggestions will be appreciated.
Thanks in advance
Mahendra

7 Answers, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 01 Dec 2011, 11:54 AM
Hi Mahendra Kumar,

Please upgrade to our latest official SP1 release(2011.2.1117). You can download it from your Telerik account here: Public URL . The new release incorporates many new features and fixes including support for the latest browser versions. It's quite likely that the issue you are experiencing was already fixed.

If you are still experiencing this problem, configure Firefox and Safari according our documentation here and here and ensure the Telerik Add-ons are enabled (see screenshots). This should resolve the problem.

Let me know how it goes.

Greetings,
Plamen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Mahendra Kumar
Top achievements
Rank 1
answered on 13 Dec 2011, 11:38 AM
hi Plamen,
I upgrade the webaii version to the latest (2011.2.1117) one as specified by you and also have configured the Mozilla and Chrome (Not Safari as of now) has documented, but no luck yet. 

Still I have same issue handling the windows dialogue's. it works fine in IE.
 I noticed that on Firefox Telerik Add-on for Client 4 is not enabled and I do not have the option to enable it :(. It dislpays the red mark icon on add-on. but Telerik Add-on for client 3 is enabled and I am using the firefox version 3.6.24. So the  Telerik Add-on for client 3 
should suffice here. But not able to figure out what is wrong here. 
Does this latest version or the framework support the windows dialouge on other browsers like FireFox, Chrome etc.. ? 

See the attached screen shot for the same. 

This is stopping me to continuewith browser compatibilty testing against firefox and Chrome. 

Appreciated the help. 

Thanks & regards,
Mahendra



0
Plamen
Telerik team
answered on 14 Dec 2011, 02:45 PM
Hello Mahendra Kumar,

We do support dialog handling with all browsers. What is the error message in Firefox and Chrome?  Is there some way we can get direct access to your application? If not, can you point us to a public web site that exhibits this Dialog appearance so we can try to find a proper solution? Alternatively you could record a Fiddler Trace and send it to us in a .zip file.

If you consider this information to be too sensitive for a public forum. Please go ahead and open a support ticket. Unlike a forum thread support ticket is completely confidential, just make sure the support ticket contains a reference to this forum thread. 

Greetings,
Plamen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Mahendra Kumar
Top achievements
Rank 1
answered on 19 Dec 2011, 03:16 PM
Hi Plamen,

I was able to get the scripts working with Firefox and chrome to handle the windows dialogue. But I have a issue with chrome browse to read the popup window message.
Chrome does not provide the "text" property to capture the text message displayed in popup window.
Below is the extract of code that I have written which works absolutely fine for IE/FF, but does not work with Chrome. Is there a work around to read/get the text message or is this a limitation with webaii to read the message in chrome browser. But I am able to handle the popup window.

                // Get the Message in the Dialog
                switch (ParentBrowser.BrowserType)
                {
                    default:
                    case BrowserType.FireFox:
                    case BrowserType.Chrome:
                    case BrowserType.Safari:
                        // Find the Element that is text and does not have an empty Name.
                        foreach (AutomationElement ae in window.FindAll(TreeScope.Descendants, new PropertyCondition(AutomationElement.LocalizedControlTypeProperty, TEXT_CONTROL_TYPE)))
                        {
                            if (string.IsNullOrEmpty(ae.Current.Name))
                                continue;

                            DialogMessage += ae.Current.Name;

                            if (ParentBrowser.BrowserType == BrowserType.FireFox)
                                break; // We found the message we can stop looking.
                        }
                        break;
                    case BrowserType.InternetExplorer:
                        DialogMessage = window.FindFirst(TreeScope.Descendants, new PropertyCondition(AutomationElement.LocalizedControlTypeProperty, TEXT_CONTROL_TYPE)).Current.Name;
                        break;
                }

Thanks in Advance.
Regards,
Mahendra
0
Plamen
Telerik team
answered on 20 Dec 2011, 01:35 PM
Hello Mahendra Kumar,

I consulted with our developers on this and judging from the provided code we came to the conclusion that you are using the Microsoft UI Automation framework. Telerik Test Studio is using completely different framework and unfortunately we really can't help you implementing the solution. For assistance with the MS UI Automation Framework you'll need to contact Microsoft.

If you are interested in using Telerik Testing Framework you can check out the "HTML Pop-ups & Dialogs" section from our online documentation.

All the best,
Plamen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Mahendra Kumar
Top achievements
Rank 1
answered on 21 Dec 2011, 07:53 AM
hi Plamen, 

I am using the telerik testing framework only version 2011.2. below is the code that I am using to handle the dialogue popups and have written my own code to capture the text displayed in popup window which I have given in my earlier response. 

var altDlg = new TMSConfirmDialog(ActiveBrowser, button, ExpectedDialogButtons.Two);
            Manager.DialogMonitor.AddDialog(altDlg);
            Manager.DialogMonitor.Start();
            Thread.Sleep(20000);
            PfmPageManager.HistoryPage.Elements.HistoryDataGrid.GoToDetailPage("", "Version", "Revert", versionNumber);
            string dialogMessage = altDlg.DialogMessage;
            Manager.DialogMonitor.RemoveDialog(altDlg);
            return dialogMessage;

I just want to know if it is possoble to read the text message dispalyed in windows dialogue popup in Chrome browser. 

Thanks & Regards,
Mahendar 
0
Plamen
Telerik team
answered on 27 Dec 2011, 05:24 PM
Hello,

I'm sorry for the delay getting back to you. 

It should be possible to read the dialog message in Chrome, but the approach you are taking is not too easy to implement, because some elements are rendered differently based on the browser. To be able to help you further with this we need you to send us your project(in a .zip file). Access to this popup window will also help us to figure this out for you. 

If this is not possible, you can try to use a tool like UI Spy tool to view the visual hierarchy structure, property values and raised events as explained in this forum thread.
 
All the best,
Plamen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
Mahendra Kumar
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Mahendra Kumar
Top achievements
Rank 1
Share this question
or