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

Thread is closed for posting
3 posts, 0 answers
  1. David
    David avatar
    19 posts
    Member since:
    Nov 2008

    Posted 18 Feb 2010 Link to this post

    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. Missing user
    Missing user avatar

    Posted 18 Feb 2010 Link to this post

    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.
  3. Missing user
    Missing user avatar

    Posted 19 Feb 2010 Link to this post

    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.
Back to Top