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

How to find a popup in the RadTreeView

9 Answers 141 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Stanislav
Top achievements
Rank 1
Stanislav asked on 19 Mar 2013, 11:17 PM
Hello,

The popup is displayed after the right click on the RadTreeViewItem. I am struggling with its identification. There is no Popup, RadContextMenu, ContextMenu and other possible WPF elements in the application. I have printed out all elements in the visual tree and could not find any traces of it. Is there any way in Telerik testing framework to identify this "popup" window with several items and click on one of them?

I have also enclosed a screen shot of the popup to this thread.

Thank you.

Kind Regards,
Stanislav Hordiyenko

9 Answers, 1 is accepted

Sort by
0
Boyan Boev
Telerik team
answered on 22 Mar 2013, 12:21 PM
Hello Stanislav,

This is most probably RadContextMenu.

Please try to refresh the visual tree before the click step calling .RefreshVisualTrees();

Can you send us the application (or a sample one) so we can investigate it further and give you a solution. If it is not possible send us a screen shot of the entire DOM tree.

Hope to hear from you soon.

Regards,
Boyan Boev
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
David
Top achievements
Rank 1
answered on 25 Mar 2013, 04:21 AM
Hello Boyan,

Thank you for your reply. Unfortunately, it is not a RadContextMenu. I tried to refresh visual tree, but it did not help me.

How can I send you a screen shot of a DOM tree? Do you have any tools to do so?

Thank you.

Kind Regards,
Stanislav Hordiyenko
0
Boyan Boev
Telerik team
answered on 26 Mar 2013, 10:05 AM
Hello Stanislav,

You can use this very simple tool and check in the DOM tree what kind of control is that menu.

Hope to hear from you soon.

Greetings,
Boyan Boev
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Stanislav
Top achievements
Rank 1
answered on 27 Mar 2013, 01:04 AM
Hello Boyan,

Thank you for the link to this cool tool. Previously, I was using my own tool for looking into Xaml tree :-)

I have enclosed a new screen shot from the Snoop application to this message.

Please, let me know if you need more information. I hope this will help to come up with the solution to solve this issue.

Thank you.

Kind Regards,
Stanislav Hordiyenko
0
Boyan Boev
Telerik team
answered on 28 Mar 2013, 12:19 PM
Hi Stanislav,

What I can see from the screen shot is that the parent element is Microsoft Popup control. It has a child which is ContextMenu

Our Framework uses both of these controls, so there should not be a  problem to locate them. In the screen shot I am not able to see the attributes of the control. However the code should be a regular one for locating elements:

FrameworkElement e = ActiveBrowser.SilverlightApps()[0].Find.ByExpression(new XamlFindExpression("xamltag=Popuproot"));
Popup pop = e.As<Popup>();

In order to assist you best and give you a coded solution we will need direct access to the application.

Thank you for your understanding.

All the best,
Boyan Boev
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Stanislav
Top achievements
Rank 1
answered on 01 Apr 2013, 10:43 PM
Hello Boyan,

I tried to locate the element the way you suggested, but it didn't help me. I have WPF application, and I was looking for Popuproot in MainWindow. Unfortunately, it returned null.

I have enclosed the sample application. Can you take a look, please? The popup that I can't locate is appeared when you do a right click on the Log Out.

Thank you. I look forward to hearing from you.

Kind Regards,
Stanislav Hordiyenko
0
Accepted
Boyan Boev
Telerik team
answered on 02 Apr 2013, 09:22 AM
Hi Stanislav,

Thank you for providing us with the application.

The control of the pop up is Rectangle with name Bg. I was able to locate it and perform a click:

FrameworkElement text = ActiveApplication.MainWindow.Find.ByTextContent("Log out");
text.User.Click(MouseClickType.RightClick);
ActiveApplication.MainWindow.RefreshVisualTrees();
Rectangle rec = ActiveApplication.MainWindow.Find.ByName<Rectangle>("Bg");
rec.User.Click();

I recorded a short video as a demonstration.

Hope this helps.  

All the best,
Boyan Boev
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Stanislav
Top achievements
Rank 1
answered on 04 Apr 2013, 03:14 AM
Hello Boyan,

Thank you to resolve my issue.

Kind Regards,
Stanislav Hordiyenko
0
Boyan Boev
Telerik team
answered on 04 Apr 2013, 08:02 AM
Hello Stanislav,

Great! I am glad to hear that this issue is resolved. 

Please don't hesitate if you have additional questions.
 


Regards,
Boyan Boev
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Stanislav
Top achievements
Rank 1
Answers by
Boyan Boev
Telerik team
David
Top achievements
Rank 1
Stanislav
Top achievements
Rank 1
Share this question
or