This is a migrated thread and some comments may be shown as answers.
FindException on Firefox 8
10 Answers 33 Views
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 05 Mar 2012, 10:51 PM
Hi,

All of my automation is failing on Firefox 8 with the following error: 
"(FireFox): ArtOfTest.WebAii.Exceptions.FindException : Find Details:
- FindParam used: [Find logic: Use 'AttributesOnly' where (name=email) ]
- Start Element: [Element: '#comment#:-1']

  ----> System.ArgumentException : Start reference has to be a valid element and not an EndTag
Parameter name: Reference"

These same tests pass on IE 9. I followed all the instructions at http://www.telerik.com/automated-testing-tools/community/forums/test-studio-express/automation-framework/findexception-in-ie.aspx, but the failure still repros for me on Firefox 8. Please help!

Configuration:
Win7 x64
VS10
Nunit (x86)
Latest Webaii .dlls
Firefox 8 

Thanks,
Chris

10 Answers, 1 is accepted

Sort by
0
Chris
Top achievements
Rank 1
answered on 07 Mar 2012, 05:00 PM
Any help/thoughts on this issue? All our Firefox tests are failing.
0
Ivaylo
Telerik team
answered on 07 Mar 2012, 05:40 PM
Hello Chris,

We would be glad to help you on that problem, however we will need a repro on our side. Could you please provide us with step by step instructions on how to reproduce it.

Looking forward to hear from you.

Greetings,
Ivaylo
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Chris
Top achievements
Rank 1
answered on 07 Mar 2012, 05:47 PM
With the above named configuration...
1. Run a test from Nunit that Opens a website in Firefox 8
2. Notice that the test fails upon searching for a text input 
0
Ivaylo
Telerik team
answered on 08 Mar 2012, 04:09 PM
Hello Chris,

Unfortunately this information will not be enough to repro. Could you please send us the complete NUnit test we can load up and execute locally that demonstrates this problem?

Thank you.

All the best,
Ivaylo
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Chris
Top achievements
Rank 1
answered on 08 Mar 2012, 10:30 PM
The simple google.com demo test seems to work fine in Firefox, but the pages I need to test have the following comments above the html tag. It seems that whenever there are comments above the html tag, then ActiveBrowser.Find... fails due to the error above.

"<!--[if lt IE 7 ]> <html class="ie6" xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://ogp.me/ns/fb#" xmlns:gc="http://www.groupcommerce.com/2010/gcml"> <![endif]-->
<!--[if IE 7 ]>    <html class="ie7" xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://ogp.me/ns/fb#" xmlns:gc="http://www.groupcommerce.com/2010/gcml"> <![endif]-->
<!--[if IE 8 ]>    <html class="ie8" xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://ogp.me/ns/fb#" xmlns:gc="http://www.groupcommerce.com/2010/gcml"> <![endif]-->
<!--[if IE 9 ]>    <html class="ie9" xmlns="http://www.w3.org/1999/xhtml" xmlns:og="http://ogp.me/ns#" xmlns:fb="http://ogp.me/ns/fb#" xmlns:gc="http://www.groupcommerce.com/2010/gcml"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!-->
<html ...>
<!--<![endif]-->"

I think the find is tripping over the comments. Why is that happening? Shouldn't the comments be getting ignored by the Find?
0
Ivaylo
Telerik team
answered on 09 Mar 2012, 06:09 PM
Hello Chris,

Unfortunately this information doesn't help us a lot. Could you please provide the URL to the page or the NUnit test (along with a sample web page) so we can get a repro?

Thank you.

Regards,
Ivaylo
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Chris
Top achievements
Rank 1
answered on 09 Mar 2012, 06:26 PM
1. Run the following test from NUnit:
        [Test]
        public void SimpleTest()
        {
            myManager.LaunchNewBrowser(); //Browser must be Firefox to repro the issue
            myManager.ActiveBrowser.NavigateTo("http://www.czarrewards.com/national");
            myManager.ActiveBrowser.Find.ByName<HtmlInputEmail>("email").Text = "foo@foo.foo";
            Thread.Sleep(1000);
        }

2. I get the following error:
"WebAiiTestExamples.WebAiiTestExamples.SimpleTest:
ArtOfTest.WebAii.Exceptions.FindException : Find Details:
- FindParam used: [Find logic: Use 'AttributesOnly' where (name=email) ]
- Start Element: [Element: '#comment#:-1']
  ----> System.ArgumentException : Start reference has to be a valid element and not an EndTag 
Parameter name: Reference"

This error seems to happen on any page that has the conditional comments before the html tag. The comments are indeed formatted correctly. Why is Find even considering the comments. Is there a bug in Find when browsing in Firefox?



0
Ivaylo
Telerik team
answered on 12 Mar 2012, 03:30 PM
Hello Chris,

Thank you for providing us with a sample NUnit test. I tried to reproduce it but I was not able to, I tried with Mozilla Firefox 8 (the version you are using) and the latest version available but I was not able to. This behavior might be due to some local settings on your machine. Please refer to the screenshot attached. 

Greetings,
Ivaylo
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
0
Chris
Top achievements
Rank 1
answered on 12 Mar 2012, 06:10 PM
Hmm... Any thoughts as to what setting on my PC and/or VS and/or NUnit would cause HTML comments to get parsed? This is super frustrating since all I thought I did was update to the latest Webaii .dlls and Firefox 8.
0
Ivaylo
Telerik team
answered on 13 Mar 2012, 05:41 PM
Hello Chris,

The only thing that comes across my mind is to have a plugin causing the issue with Firefox and I think you should dig into that direction. Please disable any plugin or add-on and review your Firefox settings again.

Kind regards,
Ivaylo
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Asked by
Chris
Top achievements
Rank 1
Answers by
Chris
Top achievements
Rank 1
Ivaylo
Telerik team
Share this question
or