开发者

How to access functions from different "Action" in QTP?

开发者 https://www.devze.com 2023-03-09 20:01 出处:网络
I have some code in Action1 item. I have added Action2 where I want to store some common function but if I call it from Action1, it does not work.

I have some code in Action1 item. I have added Action2 where I want to store some common function but if I call it from Action1, it does not work. I just want to create some "global ac开发者_开发知识库tions" that will be reusable. Thanks


May be having a "Function library" and have your functions defined there would be easier.


For modular reuse with QTP, your options are:

  1. Use function libraries (as @Vikas noted)
  2. Use reusable Actions

If you are going to use actions, then each action should itself be modular. Whatever piece of code you want to be reused should be a whole Action unto itself, not part of another action.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号