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

Can I rename elements?

8 Answers 129 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Misty
Top achievements
Rank 1
Misty asked on 03 Sep 2015, 04:36 PM
I feel like this is a really dumb question so I apologize in advance. I'm not sure I fully understand what elements are. I can see them in the html code on our sites and I can see them in the elements pane in test studio. Can I change the name of them in test studio? For example, I will be clicking on the "Log In" button. The elements pane shows "LoginButtonButton" or when I'm looking at the elements for a different test, I see, "SideMenuParentNavI0i0TLink". I don't know what that is so can I rename it to "Cancel" button?

8 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 03 Sep 2015, 11:01 PM
Hello Misty,

I'll be glad to clarify how the elements in the elements pane actually work. What you see in the pane is analogous to variable names of a program. The name of the variable is unimportant. What matters is the data the variable holds.

Similarly the name you see in the elements pane is what we call the "friendly name". What the friendly name is exactly does not affect test execution. Each element you see has a find expression connected with it. It's this find expression that Test Studio uses for locating the correct target element from all the other elements contained in the HTML that you're looking at. Here is documentation on how to change the find expression for the elements you see in Test Studio.

You can change the friendly name of the elements using the popup context menu.

Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Misty
Top achievements
Rank 1
answered on 04 Sep 2015, 01:36 PM

Hi Cody,

Thanks for the response. I did look at the links you provided before reaching out. Maybe I'm not explaining what I need in a clear way. Can I change the name of the step in test or do I have to change the element? On step 20 in my test, it says, "Click 'GoToSpan'" and I don't know what that is. Can I rename my step or will it fail? I've run into problems where a test has failed but I'm unsure as to why because I don't understand what the test step is referring to. I thought this was an element I needed to change but now I'm not so sure.

 

-Misty

0
Cody
Telerik team
answered on 04 Sep 2015, 02:54 PM
Hi Misty,

I apologize if I'm referring you to documentation you've already read. It's a habit I've built since so many people don't bother doing their own research in our documentation.

You can do both:
  • Changing the friendly name of the element displayed in Elements Explorer will simultaneously change the step description. The new friendly name you just set will be displayed in the step description. Renaming the element will not change the behavior of your test (pass or fail) i.e. a failing test won't start to work nor will a working test start to fail with this one change.
  • You can also edit the description of the test step to anything you want. Likewise changing the step description will not change the behavior of the test. However once you modify the step description (it's now a custom description instead of the default description) changes to the elements friendly name won't automatically be carried over into your custom step description.

If you have a failing test you need help with, just send me the exported step failure details for analysis.


Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Misty
Top achievements
Rank 1
answered on 04 Sep 2015, 03:02 PM

No need to apologize. It's nice to have a place to go back and reference and I'll know exactly where I can go to find the links you've provided. I am having issues. I don't understand why my test continues to fail in one spot. When I manually ran the test, I did not have any issues. Here is the log file:

 Overall Result: Fail
------------------------------------------------------------
'9/4/2015 9:58:32 AM' - Executing test: 'Home', path: 'Home.tstest.'
'9/4/2015 9:58:32 AM' - Using .Net Runtime version: '4.0.30319.34014' for test execution. Build version is '2015.2.827.0'.
'9/4/2015 9:58:32 AM' - Starting execution....
------------------------------------------------------------
------------------------------------------------------------
'9/4/2015 9:58:36 AM' - Enabling Html Popup Tracker. Test expecting Popups.
'9/4/2015 9:58:36 AM' - Using 'FireFox' version '39.0' as default browser. 
'9/4/2015 9:58:40 AM' - 'Pass' : 1. Execute test 'Login'

>>> Test-as-Step 'Login.tstest' log starts:

Overall Result: Pass
------------------------------------------------------------
'9/4/2015 9:58:36 AM' - Enabling Html Popup Tracker. Test expecting Popups.
'9/4/2015 9:58:36 AM' - Using 'FireFox' version '39.0' as default browser. 
'9/4/2015 9:58:37 AM' - 'Pass' : 1. Clear Browser Cache
'9/4/2015 9:58:37 AM' - 'Pass' : 2. Navigate to : 'xxxxxx'
'9/4/2015 9:58:39 AM' - 'Pass' : 3. Enter text 'xxxxx' in 'DataUsernameIText'
'9/4/2015 9:58:39 AM' - 'Pass' : 4. Click 'DataPasswordIPassword'
'9/4/2015 9:58:39 AM' - 'Pass' : 5. Enter text 'xxxxx*' in 'DataPasswordIPassword'
'9/4/2015 9:58:39 AM' - 'Pass' : 6. Click 'DataRememberMeSDSpan'
'9/4/2015 9:58:40 AM' - 'Pass' : 7. Click 'LoginButtonButton'
------------------------------------------------------------
'9/4/2015 9:58:40 AM' - Overall Result: Pass
'9/4/2015 9:58:40 AM' - Duration: [0 min: 3 sec: 252 msec]
------------------------------------------------------------

<<< Test-as-Step 'Login.tstest' log ends.

'9/4/2015 9:58:49 AM' - 'Pass' : 2. Click 'Home'
'9/4/2015 9:58:49 AM' - 'Pass' : 3. Click 'Alerts'
'9/4/2015 9:58:53 AM' - 'Pass' : 4. Click 'AddAlert'
'9/4/2015 9:59:00 AM' - 'Pass' : 5. Click 'Cancel'
'9/4/2015 9:59:00 AM' - 'Pass' : 6. Click 'Favorites'
'9/4/2015 9:59:00 AM' - 'Pass' : 7. Click 'Resources'
'9/4/2015 9:59:00 AM' - 'Pass' : 8. Click 'Unread messages'
'9/4/2015 9:59:03 AM' - 'Pass' : 9. Click 'Go to unread messages'
'9/4/2015 9:59:05 AM' - 'Fail' : 10. Click 'Home'
------------------------------------------------------------
Failure Information: 
~~~~~~~~~~~~~~~
ExecuteCommand failed!
InError set by the client. Client Error:
mozCommandProcessor: ProcessInformationCommand(): Document is not ready to retrieve its markup.
BrowserCommand (Type:'Information',Info:'DocumentMarkup',Action:'NotSet',Target:'null',Data:'',ClientId:'37ed259d-e587-4154-b85d-07a789f9e531',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'mozCommandProcessor: ProcessInformationCommand(): Document is not ready to retrieve its markup.')
InnerException: none.

InnerException:
ArtOfTest.WebAii.Exceptions.ExecuteCommandException: ExecuteCommand failed!
InError set by the client. Client Error:
mozCommandProcessor: ProcessInformationCommand(): Document is not ready to retrieve its markup.
BrowserCommand (Type:'Information',Info:'DocumentMarkup',Action:'NotSet',Target:'null',Data:'',ClientId:'37ed259d-e587-4154-b85d-07a789f9e531',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'mozCommandProcessor: ProcessInformationCommand(): Document is not ready to retrieve its markup.')
InnerException: none.

   at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request, Boolean performDomRefresh, Boolean waitUntilReady)
   at ArtOfTest.WebAii.Core.Browser.RefreshDomTree()
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request, Boolean performDomRefresh, Boolean waitUntilReady)
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request)
   at ArtOfTest.WebAii.Core.Actions.Click(Element targetElement)
   at ArtOfTest.WebAii.Controls.HtmlControls.HtmlControl.Click()
   at ArtOfTest.WebAii.Controls.HtmlControls.HtmlControl.Click(Boolean isClosing)
   at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.ClickActionDescriptor.Execute(Browser browser)
   at ArtOfTest.WebAii.Design.Extensibility.HtmlActionDescriptor.Execute(IAutomationHost autoHost)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)
------------------------------------------------------------
'9/4/2015 9:59:05 AM' - Detected a failure. Step is marked 'ContinueOnFailure=False' aborting test execution.
------------------------------------------------------------
'9/4/2015 9:59:05 AM' - Overall Result: Fail
'9/4/2015 9:59:05 AM' - Duration: [0 min: 28 sec: 782 msec]
------------------------------------------------------------
'9/4/2015 9:59:07 AM' - Test completed!

0
Misty
Top achievements
Rank 1
answered on 04 Sep 2015, 03:48 PM

Cody,

I just ran the same test in IE11 and Chrome and it works just fine. It appears to be a problem in Firefox. I hope that helps!

 Misty

0
Cody
Telerik team
answered on 04 Sep 2015, 04:20 PM
Hi Misty,

Oh wow! That's a very serious error. We saw this problem last year but were unable to get to the bottom of it because the customer that reported it did not provide us with credentials to his system. Yes the error message is very specific to Firefox. You can't get a "mozCommandProcessor" error in any other browser since that particular error message is coming straight out of Firefox.

We would very much like to get to the bottom of what is causing this particular error and fix it. The fix must be done on our side. I've discovered I have access to the test system. I also edited your last post to mask off the URL, username and password for security sake. This is a public forum that the entire world can see.

Can you open a new support ticket for this error (all support tickets are private)? Would you mind attaching a copy of the failing test for me to run and reproduce the problem here? What I need is the .tstest file on disk plus matching .resx file plus the optional .cs/,vb file if it exists. Put all 3 into a .zip file and attach that.

The only possible workaround I can offer is to insert a fixed execution delay between steps 9 & 10. This is more of a band-aide but hopefully will get your test to pass while we investigate and fix the real problem.

Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Cody
Telerik team
answered on 04 Sep 2015, 07:54 PM
Hi Misty,

One more thing I'd like you to try. Firefors is up to version 40.0.3. Your log shows you have version 39.0 installed. Can you try upgrading Firefox to see if that happens to resolve this error? I cannot guarantee it will, but it's so easy to try it's worth spending a few minutes doing it.

Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
0
Misty
Top achievements
Rank 1
answered on 08 Sep 2015, 03:01 PM

Hi Cody,

I updated Firefox to 40.0.0 as you suggested and I'm still receiving the error and a failed test. I will create a support ticket and attach a copy of the failing test as you're requesting, in the next few minutes.

Misty

Tags
General Discussions
Asked by
Misty
Top achievements
Rank 1
Answers by
Cody
Telerik team
Misty
Top achievements
Rank 1
Share this question
or