Telerik Forums
Testing Framework Forum
3 answers
786 views
Morning Telerik,

To get the text from the WPF tooltip I am using .ToolTipText property after executing .HoverOver() method. I noticed that very frequently, the tooltip stays on screen and is not disappeared. It is really distracting as to the end of the test there are a big number of WPF tooltips in the window.

This is my extension method to get tooltip text:
public static string GetTooltipText(this FrameworkElement element)
{
    element.Refresh();
    element.User.HoverOver();
 
    Thread.Sleep(500);
 
    var toolTipText = element.ToolTipText.Trim();
 
    return toolTipText;
}

Please, let me know how to initiate hiding of the tooltip after the text is saved.

Thank you.

Kind Regards,
Stanislav Hordiyenko
Velin Koychev
Telerik team
 answered on 16 Apr 2013
6 answers
259 views
Hi,

Does Telerik(SilverLight 4) controls supports Coded UI-Test which comes with VS 2010 FP2?


Rupesh
Kalyan
Top achievements
Rank 1
 answered on 16 Apr 2013
3 answers
58 views
Hi All,
Recently I faced with issue related to element refresh flow. I am able to reproduce it on very simple flow.
The root cause of this issue is next: 
Assume you are working with page which have 2 <div> panels with anchor inside panels. Anchor has equal ID's but different text.
Only one panel can be visible at the moment.
So, let's take anchor from second panel (suppose it visible now), then explicitly call refresh of this control. As result you will receive anchor from the first panel (which is invisible) and wrong control.
Below I provide code snippet with demonstrate this issue and attached sample web page.

string localPageIE = @"D:\DuplicateAnchorsID\DuplicateID.html";
Manager.Current.LaunchNewBrowser(BrowserType.InternetExplorer);
Manager.Current.ActiveBrowser.NavigateTo(localPageIE);
 
Manager.Current.ActiveBrowser.RefreshDomTree();
// get all anchors from second (visible) panel
ReadOnlyCollection<HtmlAnchor> linkWrappers = Manager.Current.ActiveBrowser.Find.AllByXPath<HtmlAnchor>("//div[@class='linksGroup2']//a");
// get second item from collection to demonstrate issue
HtmlAnchor linkItem = linkWrappers[1];
// log info before refresh call
_logger.Info(string.Format("Requested Anchor: innerText - [{0}], tagIndex - [{1}]", linkItem.BaseElement.InnerText, linkItem.BaseElement.TagNameIndex));
linkItem.Refresh();
// log info before refresh call
_logger.Info(string.Format("Requested Anchor: innerText - [{0}], tagIndex - [{1}]", linkItem.BaseElement.InnerText, linkItem.BaseElement.TagNameIndex));

This code snippet produced next output:
Requested Anchor: innerText - [Item5], tagIndex - [4]
Requested Anchor: innerText - [Item2], tagIndex - [1]

Reproduced on next configuration:
OS: Win 7 64
Browsers: IE9/10, Firefox/Chrome latest
TTF: 2012.2.1317.0

Any ideas how I can overcome this issue ?

Thanks,
Mykola
Mykola
Top achievements
Rank 1
 answered on 15 Apr 2013
3 answers
289 views
Hello,
can anybody help what is the wait for condition has timed out .I am giving sleep also it is not working and one more things in silverlight the pop-up windows like child windows is not recoginized by the telrik with vsts iam using .plez iam getting lot of problem while running can any materials is there to explore the telrik with vsts.

thanks in advance
regards
Dileep.s

'6/22/2010 3:06:43 AM' - 'Fail' : 22. [dest1_CodedStep11] : @"Click on RajeshTestTextblock", RequiresSilverlight = true
--------------------------------------------------
Failure Information:
~~~~~~~~~~~~~~~
Exception thrown executing coded step: '[dest1_CodedStep11] : @"Click on RajeshTestTextblock", RequiresSilverlight = true'.
InnerException:
System.TimeoutException: Wait for condition has timed out
   at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo)
   at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait)
   at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout)
   at ArtOfTest.WebAii.Silverlight.VisualWait.ForExistsInternal(Int32 timeout, Boolean invertCondition)
   at ArtOfTest.WebAii.Silverlight.VisualWait.ForExists(Int32 timeout)
   at ArtOfTest.WebAii.Silverlight.VisualWait.ForVisible(Int32 timeout)
   at ArtOfTest.WebAii.TestTemplates.XamlElementContainer.Get(XamlFindExpression expr, Boolean waitOnElement, Int32 timeout)
   at ArtOfTest.WebAii.TestTemplates.XamlElementContainer.Get(XamlFindExpression expr)
   at ArtOfTest.WebAii.TestTemplates.XamlElementContainer.Get[TControl](XamlFindExpression expr)
   at ArtOfTest.WebAii.TestTemplates.XamlElementContainer.Get[TControl](String[] clauses)
   at dest90.Pages.OntSysSilverlightPage.SilverlightAppElement.get_RajeshTestTextblock() in c:\documents and settings\dileep.s\my documents\visual studio 2008\projects\dest90\project.cs:line 195
   at dest90.dest1.dest1_CodedStep11() in C:\Documents and Settings\dileep.s\My Documents\Visual Studio 2008\Projects\dest90\dest1.aii.cs:line 177
--------------------------------------------------
'6/22/2010 3:06:43 AM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
--------------------------------------------------
'6/22/2010 3:06:43 AM' - Overall Result: Fail
--------------------------------------------------
Boyan Boev
Telerik team
 answered on 09 Apr 2013
1 answer
151 views
Hello Telerik,

I get the following exception, when I try to get information about the color in Rectangle element:

[WPF Extension Error] Details: System.InvalidOperationException: The calling thread cannot access this object because a different thread owns it.
   at System.Windows.Threading.Dispatcher.VerifyAccess()
   at System.Windows.Media.GradientStopCollection.System.Collections.IEnumerable.GetEnumerator()
   at Telerik.TestingFramework.XamlExtension.ClientProcessor.ObjectToString(Object obj, Boolean isAutomationPeer, Type objType)
   at Telerik.TestingFramework.XamlExtension.ClientProcessor.ProcessCommand(String command)


Code:
var rect = app.MainWindow.Find.AllByType<Rectangle>();
var brush = rect[0].Fill as LinearGradientBrush;
var color = brush.GradientStops[0].Color; //here the exception is occurred

Thank you.

Kind Regards,
Stanislav Hordiyenko
Boyan Boev
Telerik team
 answered on 09 Apr 2013
2 answers
129 views
Hi,

How to upload a file? I have attached a pic showing the scenario. On clicking upload photo a window opens, how to give the File name in that text box?
Thanks
Sudarshan 
Sudarshan
Top achievements
Rank 2
 answered on 08 Apr 2013
9 answers
199 views
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
Boyan Boev
Telerik team
 answered on 04 Apr 2013
14 answers
556 views
I'm running test in 4 browsers (Chrome, FF, IE and Safari). 
The navigateTo(url) method sometimes takes 3-5 sec but sometimes 15s.
I have AutoWaitUntilReady setting set to false. I run the same tests in all four browsers.
Can I decrease this (navigateTo) time? It can be 3-5sec but the problem is when it takes more than 5. I have time limit for each test so I can wait so long.

Plamen
Telerik team
 answered on 29 Mar 2013
5 answers
295 views
Hi there

While I know that the Telerik Testing Framework officialy does NOT support 3rd party controls like the ones from DevExpress (except of course the Telerik controls), I'd like to make things work with the file upload control from DevExpress.

See it in action here: http://demos.devexpress.com/aspxperiencedemos/uploadcontrol/Example.aspx

It has some magic (input control follows the mouse while the mouse is over the control). You can see the behaviour when inspecting the element (for example in Chrome). But if I try to click anywhere, nothing happens (at least in chrome). 

Is there any way to make this work?

Thank you very much.
Florian
Boyan Boev
Telerik team
 answered on 29 Mar 2013
3 answers
92 views
I've created a unit test that runs perfectly in chrome but is unable to click or hover an HtmlAnchor when IE = browsertype. See attached DOM tree.

[TestMethod]
        [TestCategory("Nightly")]
        public void SearchTest()                  
        {

            Manager.LaunchNewBrowser(BrowserType.Chrome);

            ActiveBrowser.NavigateTo("http://someURL.aspx");

            Pages.AdeptHome.AdeptLink.Click(false);

            Pages.AdeptWelcome.Markets.MouseHover();
            Pages.AdeptWelcome.Texas.Click(false);



Cody
Telerik team
 answered on 27 Mar 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?