Forum Discussion
chicks wrote:
william_roe wrote:
I'm curious why you don't use keyword tests and name mapping. We use a mix of keyword and script and find only the keyword referebces refactor / rename when objects change (i.e. move). The same would be true for not mapping. I can't image managing references such as:
Sys.Browser("chrome").Page("http://localhost/CMWebTest/Go/?p=/CMWebTest/Crib/Properties/1").Panel("primaryWrapper").Section("primaryContent").Frame("t_cmwebtest_crib_properties_1_content").Section("actionWrapper").Section("actionContent").Panel(0).Form("mainForm").Panel("partialCribProperties").Panel("partialCribProperties_CC").Panel("partialCribProperties_C0").Panel(0).Article(0).Panel(0).Panel(6).Panel(1).Table("AlertEMailAddress_ET").Cell(0, 1).Table("AlertEMailAddress").Cell(0, 0).Textbox("AlertEMailAddress_I")
we create a function call for each gui object to find / refer to the object.
so we'd have something like SetText( alert_email_textbox(), ' some text); and then in an objects file we'd have
function alert_email_textbox() {
return alert_page().FindChild( new Array("ObjectType", "idStr"), new Array("Textbox", "AlertEMail"), FIND_DEPTH);
}
So in lieu of mapping objects the FindChild method is used. I could see how this would reduce the sensitivity to objects getting moved..How's the speed? I'm assuming you use 'eval' on consumer side of this method. Can you show what that code looks like? Is the idStr attribute always used? Our templates use ObjectIdentifier
william_roe I'm assuming you use 'eval' on consumer side of this method. Can you show what that code looks like? Is the idStr attribute always used? Our templates use ObjectIdentifier
William, I don't know what you mean by " eval on the consumer side". idStr is not always used, we use whatever is most specific. sometimes it's only object identifier. Speed may be a concern, but not to the point where we have spent any time investigating alternattives.
Regards, Curt
- william_roe9 years agoSuper Contributor
chicks wrote:william_roe I'm assuming you use 'eval' on consumer side of this method. Can you show what that code looks like? Is the idStr attribute always used? Our templates use ObjectIdentifier
William, I don't know what you mean by " eval on the consumer side".
Regards, Curt
By consumer side I mean the code which is calling the function. I'm assuming there is code which does a "eval" on the results.
Related Content
Recent Discussions
- 3 hours agoSvetaG