I have an error while executing my test in FireFox:
ExecuteCommand failed!
InError set by the client. Client Error:
mozCommandProcessor: FindElement(): Tag collection is either empty or has less elements than the element occurrence requested.TagName: , Occurrence Requested: -1, All Tags Collection length: 0
BrowserCommand (Type:'Information',Info:'FrameRectangle',Action:'NotSet',Target:'null',Data:'3',ClientId:'Client_4a4fdaef-16a2-48c9-bc63-51062886594d',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'mozCommandProcessor: FindElement(): Tag collection is either empty or has less elements than the element occurrence requested.TagName: , Occurrence Requested: -1, All Tags Collection length: 0')
InnerException: none.
The error occurs on pressing several buttons. E.g.:
<input type="submit" id="btnNext" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("btnNext", "", true, "", "UnitConfiguration.aspx", false, false))" value="Next" name="btnNext">
Test step:
Desktop command: Left click on btnNext
I tried to use "Click btnNext" command, but I got the same error
Please, note that in IE7 all works fine.
How can I fix this problem?
Thanks in advance
12 Answers, 1 is accepted
What this means is that the DOM is somehow rendered differently between IE and Firefox. It is common for web applications to detect which browser is being used and send slightly different HTML to account for subtle browser differences. I am guessing this is what's happening in your case. The framework is trying to find your btnNext but can't. That's why both the "Desktop command: Left click on btnNext" and the "Click btnNext" don't work. If the framework can't find the element to act on, a different action won't make any difference.
I can help fix the Find Expression that is used to locate btnNext, but I need to see the HTML as rendered for both IE and Firefox. Is this website publicly accessible that I can view it directly? If not can you save copies of the webpage that's giving you trouble as "Webpage Complete" and send it to me? You'll need to open a new support ticket before you can attach files to it. Place the files created into a .zip file and attach that .zip file.
Best wishes,
Cody
the Telerik team

Here is the parent's div code in IE and FF:
IE7:
<div class="WizardButtons">
<input id="btnNext" onclick='javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("btnNext", "", true, "", "Configuration.aspx", false, false))'
value="Next" type="submit" name="btnNext">
<input id="btnCancel" onclick='Global_CloseRadWindow(); return false;WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("btnCancel", "", true, "", "", false, false))'
value="Cancel" type="submit" name="btnCancel">
</div>
FF3:
<div class="WizardButtons">
<input type="submit" id="Submit1" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("btnNext", "", true, "", "Configuration.aspx", false, false))"
value="Next" name="btnNext">
<input type="submit" id="Submit2" onclick="Global_CloseRadWindow(); return false;WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("btnCancel", "", true, "", "", false, false))"
value="Cancel" name="btnCancel">
</div>
Current find expression for the "btnNext" button is:
tagname=input,id=btnNext,type=submit
Seems that both DOM elements have this criteria.
How could I avoid the error?
Thank you in advance
So according to these outputs you get one element Id in IE and another in Firefox? Am I correct in my observation? If so you can eventually replace the Id in the find expression with the 'name' attribute. It looks like the same 'name' value appears in both IE and FF.
If the different Id rendering is a common case for this application under test you may also consider changing the default find logic attributes priority. From the Project tab in WebUI Test Studio QA Edition click on the very right 'Show Settings' button to get the User Settings of the project. In the popped up dialog (you can find it captured in the attached image) choose the 'Identification Logic' tab where you can change the priority like moving the 'name' attribute before 'id'. This will tell the recorder to build the find expressions by 'name' instead of 'id' by default. Once the project settings are changed make sure you save the project and start the recorder again.
Regards,
Konstantin Petkov
the Telerik team

Thank you for quick reply! I'm sorry but I did the mistake in posted DOM tree. When I formatted the tree in MS studio it changed the IDs itself :(
The correct DOM:
IE7:
<div class="WizardButtons">
<input id="btnNext" onclick='javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("btnNext", "", true, "", "Configuration.aspx", false, false))'
value="Next" type="submit" name="btnNext">
<input id="btnCancel" onclick='Global_CloseRadWindow(); return false;WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("btnCancel", "", true, "", "", false, false))'
value="Cancel" type="submit" name="btnCancel">
</div>
FF:
<div class="WizardButtons">
<input type="submit" id="btnNext" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("btnNext", "", true, "", "Configuration.aspx", false, false))"
value="Next" name="btnNext">
<input type="submit" id="btnCancel" onclick="Global_CloseRadWindow(); return false;WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions("btnCancel", "", true, "", "", false, false))"
value="Cancel" name="btnCancel">
</div>
I've tried to use "name" instead "id" but the error appears again
By the way, when I use "Click btnNext" command with "SimulateRealClick" option=False all works fine
Where is the difference between "Desktop command: Left click on btnNext" and "Click btnNext" command?
Thanks!

Error:
ExecuteCommand failed!
InError set by the client. Client Error:
mozCommandProcessor: FindElement(): Tag collection is either empty or has less elements than the element occurrence requested.TagName: , Occurrence Requested: -1, All Tags Collection length: 0
BrowserCommand (Type:'Information',Info:'FrameRectangle',Action:'NotSet',Target:'null',Data:'3',ClientId:'Client_63c9bbfb-e6c1-4495-8c51-5f37452e47b8',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'mozCommandProcessor: FindElement(): Tag collection is either empty or has less elements than the element occurrence requested.TagName: , Occurrence Requested: -1, All Tags Collection length: 0')
InnerException: none.
The steps:
1. RadInput('ControlId'): input is Enabled;
2. RadInput('ControlId'): text 'Exact' '';
3. RadInput('ControlId'): value 'test' entered;
Seems that the problem is not in control location because steps 1 and 2 are passed successfully.
Help me please!
Thanks
It seems the real MouseClick fails for you in Firefox and the invoking the browser event (SimulateRealUser=false) works. The RadInput.TypeText fails because of the same problem -- there is a MouseClick we invoke on execution. One way to solve the last problem is to convert the step to code and then comment the MouseClick call.
May I ask you please to try our latest internal build? Here is a direct link to your account internal builds download page so that you can get the latest and run it instead. We have a number of improvements for the last month or so so let's check whether this works for you.
Regards,
Konstantin Petkov
the Telerik team
Just a follow-up, the coded solution I proposed previously won't work for you. The "real" MouseClick is built into the code you will get converting that step to code, so you simply have no control over it.
We checked those scenarios in latest Firefox v3.6.8 and those seem to work just fine there for us. Please let us know whether the latest internal build works for you too, thank you!
All the best,
Konstantin Petkov
the Telerik team

Thank you very much. I'm downloading the latest build and will try it.
I'll post the result.

I've installed the build 2010.2.806 and now I can't even launch any test from my project.
There are a lot of compilation errors like this:
c:\Documents and Settings\Administrator\Desktop\Project\Project.cs: Line 19: (CS0101) The namespace 'Project' already contains a definition for 'Pages'
c:\Documents and Settings\Administrator\Desktop\Project\Project.cs: Line 56: (CS0102) The type 'Project.Pages' already contains a definition for 'Login_Page'
c:\Documents and Settings\Administrator\Desktop\Project\Project.cs: Line 437: (CS0102) The type 'Project.Pages.Login_Page' already contains a definition for 'FrameRibbonFrameFrame'
What is going wrong?
Thanks.
This probably comes from the changed elements generation file -- we no longer use the Project.cs file as before. Can you please put it in some archive (just in case) and remove it manually? You can find it in the project folder once you open that project in windows explorer.
All the best,
Konstantin Petkov
the Telerik team

Thank you very much! Looks like the issue is fixed in the latest build.
Best regards,
Nataly
I'm glad you get the problem resolved. Thank for your confirmation!
Should you need any other assistance, please let us know.
All the best,
Konstantin Petkov
the Telerik team