Is it possible to use the Action Location property to change the location of an action? Here's the code I've slapped together. Keep erroring on the last Location = line with a "wrong number of arguments or invalid property" error.
Not seeing any documentation on what other arguments that may take in. So starting to assume it's just not a valid move to try to change this property.
If this is not feasible, any other suggestions for updating some existing external action calls that are on QC to a local(git repository) path?
set qtActions = qtApp.Test.Actions
for i = 1 to qtApp.Test.Actions.Count
'MsgBox "Action: "&qtApp.Test.Actions(i).Name & "Location: "&qtApp.Test.Actions(i).Location&"Type:"&qtApp.Test.Actions(i).Type
If qtApp.Test.Actions(i).Type = "External" Then
If InStr(qtApp.Test.Actions(i).Location,"[QualityCenter]") Then
name = qtApp.Test.Actions(i).Name
name = replace(name,"[","\")
name = replace(name,"]","")
msgbox name ' The name path returns in a TestName[ActionName] format. Location property outputs this as TestName\ActionName, so change to match that format
msgbox "Moving Action to"
qtApp.Test.Actions(i).Location = "C:\SeleniumScripts\ConnectQAAutomation\QTP\Tests\"&name
And yes I realize this can be resolved through the Missing Resources panel in the UI if I disconnect from QC. Just trying to find a way to do this programmatically across many tests.
This is with QTP 10.