Under Review
Last Updated: 22 Dec 2023 07:42 by ADMIN
Ewin
Created on: 11 Apr 2014 19:25
Type: Feature Request
6
Customize Find Logic on Element Creation
When an element is added into the element repository, many times the element's find logic is based off of the id of the element.  But the Find Logic may be initially set as exact instead of end with for elements that have id like this: 

ctl00_ctl00_ctl00_ContentPlaceHolderContentBasic_ContentPlaceHolderContent_ContentPlaceHolderContent_windowAddEditWindow_C_controlAddNSP_uiFirstName

Everything before this part of the id is likely to change, but the end of the id is less likely to change. "_windowAddEditWindow_C_controlAddNSP_uiFirstName"

Please allow a way to customize how the elements that use ID as part of the find logic to exclude the unnecessary part of the id.  
3 comments
Ewin
Posted on: 12 Mar 2015 13:57
I thought of having a collection of strings to ignore.  Like as my example, the start of the id has this 'ctl00_' and 'ContentPlaceHolderContentBasic_' and the like.  Then after that, it could give me the id with the important parts using the Ends With criterion since it's no longer exact id check.  

I had another thought related to this issue.  Above in my example, there is '_ContentPlaceHolderContentBasic_' in the id, this id has 'contentplaceholdercontent' repeated a couple times, but the first time there is basic.  With this, I was thinking if I have contentplaceholdercontent as an criterion to ignore, it could also ignore any additional part of the id that is within a pair of underscores so it would also exclude basic.  

It would also help if there was a means to use a project's setting on another project.  This would be exporting these settings so the setting could be reused in a different project and for ease of use.

Hope this helps.
ADMIN
Konstantin Petkov
Posted on: 12 Mar 2015 12:28
Hi Ewin,

Dynamic IDs have always been an automation problem to tackle. To me the challenge comes from designing a useful feature to cover these type of scenarios.

I imagine the user will be supposed to somehow define what part of IDs are dynamic or static, probably a setting in Test Studio Project. Thus TS will check the string upon recording and strip the value if the predefined part is located. So if you have static ID part MyStaticElementID for example and you set it per project, we can locate it and then record "ID Contains MyStaticIDPart" instead when you record over such element.

Do you think that will be useful? Or do you imagine some other approach?

Thanks for the feedback!
ADMIN
Konstantin Petkov
Posted on: 01 Jan 2015 08:14
Similar request regarding frame info recording:
http://feedback.telerik.com/Project/161/Feedback/Details/147473-customize-default-frame-info-for-recording