Why only the latest function is called, if the function name are same in UFT 12.02?

北慕城南 提交于 2019-12-01 00:53:46

okay I found an answer to this, swiftly hopefully - it is based on the check rules of vbscript, which in hierarchy are as follows:

  1. Code is parsed line by line, last function definition with same name in same location is used.
  2. If matching function is available in function library loaded using ExecuteFile code, it is used. Otherwise…
  3. if matching function is available in action code, it is used. Otherwise…
  4. if matching function is available in function library loaded using LoadFunctionLibrary code, it is used. Otherwise…
  5. if matching function is available in statically associated function library, definition from top-level associated function library is used

So particularly for my question - the matching function in library file which is written last will be used when called in the action. So - ReportEvent(Status, TestStep, ExpectedResult, ActualResult, OptionalLink) at LOC-50 and ReportEvent(TestStep, ExpectedResult, ActualResult). at LOC -105

then the one at LOC - 105 is used.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!