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

Page link text different in IE7 & Firefox 3.0.x

5 Answers 23 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.
Mike Ideus
Top achievements
Rank 1
Mike Ideus asked on 02 Nov 2009, 07:03 PM

I’ve created a script that runs well on IE7 but not on Firefox 3.0.  My script opens a URL and logs in.  It then verifies the existence of items on the page, such as the footer and links that exists in it.  In the footer there is link titled “Policy Statements."  I have a step in the script with description, "Verify 'TextContent' 'Contains' 'Policy Statements' on 'a_Policy_Statements'."  The script fails with the following error:

 

'11/2/2009 11:57:38 AM' - 'Pass' : Verify element 'a_Policy_Statements' 'is' visible.

'11/2/2009 11:57:38 AM' - 'Fail' : Verify 'TextContent' 'Contains' 'Policy Statements' on 'a_Policy_Statements'

--------------------------------------------------

Failure Information:

~~~~~~~~~~~~~~~

ArtOfTest.WebAii.Design.Exceptions.VerificationException: String match failed (CompareType:Contains). - [Expected:Policy Statements],[Actual:Policy

                                                                                    Statements]                                                                                                                           

   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep()

 

I’ve highlighted the problem.  Notice that there is a huge space between “Policy” and “Statements.”  This exact same test works fine in IE7.  Why would Firefox report this text differently than IE does?

 

Any help is appreciated.

5 Answers, 1 is accepted

Sort by
0
Missing User
answered on 02 Nov 2009, 07:30 PM
Hello Mike,

Could you please post your link attributes? And which FF 3.0.x version is it specifically? I'd like to get a repro going on this end.

Kind regards,
Nelson Sin
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Mike Ideus
Top achievements
Rank 1
answered on 02 Nov 2009, 07:39 PM
Hi Nelson,

I'm using Firefox 3.0.14.  Where can I get the attributes you are looking for?  The following is from 'View Source'?

              </div>
               
                <div id="footer">
                    <div class="footerSection" style="margin-right: 300px; width: auto">
                        <a href="http://www.kellogg.northwestern.edu/policy/privacy.htm" target="_blank">Policy
                        Statements</a>

It does kind of look like there is a gap in the label.  But both browsers, IE and Firefox, display the label correctly.  It seems that only WebUI reads it differently.



0
Accepted
Missing User
answered on 02 Nov 2009, 10:34 PM
Hello Mike Ideus,

Thanks for the post, I was able to repo the problem and post a bug. AS a work around, please convert your verification to code and add something like the following:

[CodedStep(@"Verify 'TextContent' 'Contains' 'Policy Statements' on 'a_Policy_Statements'")]
   public void WebAiiTest1_CodedStep()
   {
       // Verify 'TextContent' 'Contains' 'Policy Statements' on 'a_Policy_Statements'
       HtmlAnchor a_Policy_Statements = Pages.CUsersnelsonARTOFTESTDesktopLinkReprohtml.a_Policy_Statements;
       a_Policy_Statements.Wait.ForExists(10000);
       //a_Policy_Statements.AssertContent().TextContent(ArtOfTest.WebAii.Controls.HtmlControls.HtmlAsserts.StringCompareType.Contains, "Policy Statements");
       Assert.IsTrue(a_Policy_Statements.TextContent.Contains("Policy") && a_Policy_Statements.TextContent.Contains("Statements"));
   }

Let us know if that works for you.

Kind regards,
Nelson Sin
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Mike Ideus
Top achievements
Rank 1
answered on 03 Nov 2009, 04:06 PM
Thanks Nelson.  That works, however it's not a good permanent work around since it would allow any characters in between Policy and Statements, such as "Policy www.telerik.com Statements."  The test would pass and that isn't a good thing.  Hopefully you guys can figure out how to resolve this in a future release.

Thanks!
0
Missing User
answered on 03 Nov 2009, 11:57 PM
Hello Mike,

Yes, you are right that this would not be a permanent solution, but we'll look to get a more permanent solution in the next release that verification step.

Kind regards,
Nelson
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Mike Ideus
Top achievements
Rank 1
Answers by
Missing User
Mike Ideus
Top achievements
Rank 1
Share this question
or