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

How To: Test the text of a RadToolTip that closes after a second?

2 Answers 41 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
David
Top achievements
Rank 1
David asked on 18 Feb 2010, 08:31 PM
So how can I test the text displayed in a RadToolTip displayed when the page is AutoTipified in WebUI?  The tips disapper when I click on them, so I can not get the WPF tool up to state to verifiy the text.

2 Answers, 1 is accepted

Sort by
0
Missing User
answered on 19 Feb 2010, 12:08 AM
Hi David,

I checked out this scenario, but I'll need to confer with a colleague a bit who knows more about the translators that I do.

We'll get back to you as soon as we can and appreciate your patience with this.

All the best,
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
Missing User
answered on 19 Feb 2010, 04:31 PM
Hello again David,

After conferring with collegues, it looks like directly checking for text in the ToolTip is not completely recordable using the recording window, but is possible by adding a custom coded step.

I am attaching a test project for demostration purposes based on this demo page. The custom coded step for the test looks like this:

[CodedStep(@"Check toolTip's text")]
public void WebAiiTest2_CodedStep3()
{
    // A param which describes visible ToolTip
    FindParam toopTipParam = new FindParam("display=!none", "class=rtWrapper");
    // Wait till the toolTip goes visible
    ActiveBrowser.Actions.WaitForElement(new FindParam[] { toopTipParam }, 5000);
    // Get the visible toolTip
    RadToolTip toolTip = Find.ByAttributes<RadToolTip>("display=!none", "class=rtWrapper");
    //Wait for ToolTip to be visible and refresh control to get ToolTip text
    toolTip.Wait.ForVisible();
    toolTip.Refresh();
    //Write Asserts here
    Assert.AreEqual(toolTip.InnerText.Contains("Patricio SimpsonYvonne MoncadaSergio GutiĆ©rrez"), true);
}

In the code, you can try changing the Assert line text to the text you are trying to verifiy in your ToolTip. Please post back if you have any questions on this.

All the best,
Nelson
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
David
Top achievements
Rank 1
Answers by
Missing User
Share this question
or