04-02-2008, 06:07 PM
(This post was last modified: 04-02-2008, 06:14 PM by ConstantChange.)
Hi all!
Even though I gave up hope in this:
Does anybody know whether its possible to call an external Action from a script without having to first using the "Insert - Call to existing Action" menu. I would like to decide dynamically which action to run, but that obviously does not work.
to make it clear, an example:
I open a new Test and write this line into the main action:
If I run the test it will throw the error "Action not found".
If I now do the "Insert - call to existing action" stuff, refering to the same action, QTP will insert another line, so the script now will look like this
Now I delete the second line which was just inserted, so the script looks EXACTLY like before
and if I run the test now it will work fine.
So, how can I avoid doing the insert shtuff?
Thanks a lot!
CC
Even though I gave up hope in this:
Does anybody know whether its possible to call an external Action from a script without having to first using the "Insert - Call to existing Action" menu. I would like to decide dynamically which action to run, but that obviously does not work.
to make it clear, an example:
I open a new Test and write this line into the main action:
Code:
RunAction "LoginDealer [LoginLib]", oneIteration, "dealer1", "d1password"
If I run the test it will throw the error "Action not found".
If I now do the "Insert - call to existing action" stuff, refering to the same action, QTP will insert another line, so the script now will look like this
Code:
RunAction "LoginDealer [LoginLib]", oneIteration, "dealer1", "d1password"
RunAction "LoginDealer [LoginLib]", oneIteration
Now I delete the second line which was just inserted, so the script looks EXACTLY like before
Code:
RunAction "LoginDealer [LoginLib]", oneIteration, "dealer1", "d1password"
and if I run the test now it will work fine.
So, how can I avoid doing the insert shtuff?
Thanks a lot!
CC