Completed
Last Updated: 03 Mar 2015 14:00 by ADMIN
Ewin
Created on: 17 Sep 2013 17:02
Type: Feature Request
3
Updating HtmlControl type along with the find logic
So I have an HtmlAnchor that had a simple search of Tagname = a and Id = the Id of the element.  

But when I made this element go from the above search critieria to locating the element by [TagIndex 'Exact' td:10][tagindex 'Exact' a:0], test studio has this element as a ArtOfTest.WebAii.Controls.HtmlControls.HtmlTableCell instead of a HtmlAnchor.

Having an option to change the HtmlControl would be useful on a specific element.  
15 comments
ADMIN
Daniel Djambov
Posted on: 03 Mar 2015 13:59
Telerik: new have implemented the option to change the control type in our latest UI (release Q1 2015) along with the new Element Mapping functionality, which is planned to be out by the end of March 2015.
Ewin
Posted on: 15 Apr 2014 18:35
Here is another example. 

ButtonsDockCSessionButtonsUCBtnArchiveLink is the name of my element.  As you can see it is a link. 

But for some really strange reason, the control type is listed as RadDock
Ewin
Posted on: 12 Feb 2014 17:42
Here is another example.  

When I added an HtmlAnchor, the recorder decided to do Expression of (TextContent=^Aurora Munroe -, tagname=a) and the Find logic is [tagname 'Exact' a] AND [TextContent 'StartsWith' Aurora Munroe -]. 

But this element is going to be dynamic to my test, so I target a HtmlDiv with a id of welcome.  When I look at the expression, it has (tagname=div,id=welcome,|,tagindex=a:1) and the controltype as Htmldiv instead of HtmlAnchor.  

http://screencast.com/t/Gki0oysl1
Ewin
Posted on: 09 Dec 2013 17:55
Here is some more evidence of elements changing from 1 type to another type. 

tagname=a,id=?_dockPersonalData_C_PersonalDataUc_LinkButtonCivilianClearCancel

But it thinks the element is a RadDock

Manager.DialogMonitor.Start();
ConfirmDialog confirmDialog = ConfirmDialog.CreateConfirmDialog(ActiveBrowser, DialogButton.OK);
confirmDialog.InitializationTime = 500;
Manager.DialogMonitor.AddDialog(confirmDialog);

Pages.SLCMSSeniorLeaderCareer41.DockPersonalDataCPersonalDataUcBtnCivClearCancelLink.Click(false);
System.Threading.Thread.Sleep(250);
confirmDialog.WaitUntilHandled(20000);
System.Threading.Thread.Sleep(250);
Manager.DialogMonitor.RemoveDialog(confirmDialog);
Manager.DialogMonitor.Stop();
David
Posted on: 15 Oct 2013 14:39
I just want to make sure we don't lose the original request, which we hit fairly frequently and totally support.

As the product under test changes, it is not uncommon for html elements to shift and it is a pain to have to rerecord the element just because an element changed from a span to a div, for example.
ADMIN
Konstantin Petkov
Posted on: 15 Oct 2013 14:33
Find logic can be updated from either the regular UI (as you do in the video) or from the Advanced View (as in your screenshot). Neither of those change the element type since that is about missing functionality, not just UI.
Ewin
Posted on: 15 Oct 2013 14:28
Is my original case of updating a element to reflect the correct htmlcontrol legitimate?  Or is it being caused by the situation described in your last comment?
Ewin
Posted on: 15 Oct 2013 14:10
is this what you are referring to in your last post?  
Attached Files:
ADMIN
Konstantin Petkov
Posted on: 15 Oct 2013 10:32
That was very helpful, thank you!

I will try to explain why you experience that. As far as I understand you try to update the find logic of a HTML table using the Select New Element UI. This guy however does exactly that - replaces the element including the element type if needed. So you select the RadGrid element and then Test Studio interprets that as RadGrid type, which is correct. However what you do in the find clauses UI is completely independent and it doesn't change the element (nor the element type).

In summary, if you need to change the find logic you can do that from the find expression builder adding/changing/removing clauses. If you want to replace the element you can use the 'Select New Element' option. Just changing the find logic doesn't replace the element and it doesn't update the element type either (which exactly is what other customers ask about).

I hope that helps!
Ewin
Posted on: 14 Oct 2013 21:04
This screencast is simplified to demonstrate what I am talking about in general for targeting a htmldiv instead of a htmltable. I noticed that after the edit of the element, it was radgrid because the element i targeted had the css class of radgrid.  
http://screencast.com/t/ZYw3igRa
ADMIN
Konstantin Petkov
Posted on: 14 Oct 2013 19:58
>>I believe I have also seen cases where I was trying to target a htmltable that happened to be within a htmldiv, but the element was consider as a htmldiv instead of htmltable.

I'm not sure I understand this statement. When you get a repro can you please record a short video and send it over with a support ticket. Please point to this feedback for reference.

Thanks!
Ewin
Posted on: 14 Oct 2013 18:44
Do you have any new information to provide from my last post?
Ewin
Posted on: 06 Oct 2013 22:28
Well, I think test studio should be able to correctly update a htmlcontrol based on the most specific search criteria like in my example. It should have made my element to an htmlanchor not a htmltablecell since the most specific search criteria is an htmlanchor. I believe I have also seen cases where I was trying to target a htmltable that happened to be within a htmldiv, but the element was consider as a htmldiv instead of htmltable. I just happen to see this when I reran a test that had such element used but the step failed because it was trying to locate the wrong htmlcontrol
ADMIN
Konstantin Petkov
Posted on: 06 Oct 2013 19:24
Hi,

No, unfortunately specifying the control type manually is not in our plans to implement in next release cycle.

What is the case when you need such a change? How often do you need to do that and why? Is this because you get constant changes of the application and need to update the find logic or coded tests accordingly?

Thanks!
Ewin
Posted on: 03 Oct 2013 17:20
Is there any update to when this will be implemented?