Verify multiline text box

4 posts, 0 answers
  1. algot
    algot avatar
    57 posts
    Member since:
    Nov 2011

    Posted 06 Jan 2012 Link to this post

    I have multiline text box with 3 strings of text in it.

    Number of Servers: 1
    Number of Concurrent Users: 1-3
    QuestionsComments:

    If I record step with "verify" function test execution failed.
  2. Anthony
    Admin
    Anthony avatar
    19 posts

    Posted 06 Jan 2012 Link to this post

    Hello Alexander,

    How does the verify fail? What are the Step Failure Details? The Export Result to File feature is the best way to send us that information.

    If the test is against a public site, please attach the test files (within a .zip file) so we can see the failure first-hand.

    This issue may be related to the way browsers render Special Characters differently. You may need to tweak the conditions of the verification so it consistently passes.

    Kind regards,
    Anthony
    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. algot
    algot avatar
    57 posts
    Member since:
    Nov 2011

    Posted 10 Jan 2012 Link to this post

    I replaced verification of 3 strings simultaneously with 3 consecutive verification one string at a time.

    To reproduce my problem I tried to insert multiline text in verify step, but it impossible.
    Then I try to use coded step:
    Pages.ProspectSitecoreNet.FrameContentIFrame.SitecoreAdditionaldescriptionTextArea.AssertContent().TextContent(ArtOfTest.Common.StringCompareType.Contains, "Number of Servers: 1\nNumber of Concurrent Users: 1-3\nQuestionsComments:");
    But step is failed:
    ArtOfTest.Common.Design.Exceptions.ExecutionException: Exception thrown executing coded step: '[PricingForm_CodedStep] : Verify 'TextContent' on 'SitecoreAdditionaldescriptionTextArea''. ---> ArtOfTest.Common.Exceptions.AssertException: String match failed (CompareType:Contains). - [Expected:Number of Servers: 1
    Number of Concurrent Users: 1-3
    QuestionsComments:],[Actual:Number of Servers: 1
    Number of Concurrent Users: 1-3
    QuestionsComments:
    ]
       at ArtOfTest.WebAii.Controls.BaseControlAssert`1.Assert(Boolean condition, String message, String expected, String actual, Boolean throwAssert)
       at ArtOfTest.WebAii.Controls.BaseControlAssert`1.AssertString(String expected, String actual, StringCompareType compareType, Boolean throwOnFailure)
       at ArtOfTest.WebAii.Controls.HtmlControls.HtmlAsserts.AssertContent.TextContent(StringCompareType compareType, String expectedValue)
       at Portal_CRM.PricingForm.PricingForm_CodedStep() in c:\Users\ago.DK\Documents\Test Studio Projects\Portal_CRM\PricingForm.tstest.cs:line 292
       --- End of inner exception stack trace ---
       at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.InternalExecuteSteps(AutomationStepList stepList, TestResult testResult, Object codeBehindInstance, Boolean& stopExecution)
  4. Anthony
    Admin
    Anthony avatar
    19 posts

    Posted 10 Jan 2012 Link to this post

    Hello Alexander,

    Breaking that single verification into three is probably the best approach.

    As you can see from the Expected vs. Actual strings in the error message, the browser is rendering those strings slightly differently during execution, as I initially expected.

    Greetings,
    Anthony
    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