How to Call Reusable API Script From GUI Script in UFT

0
48
Spread the love
  • 1
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    1
    Share

In my previous post –How To Configure SharePoint’s Services In UFT ? 
I have shown to to configure a web service in UFT. In this post we are going to see how to call them from other script.

How to Call Reusable API Script From GUI Script in UFT

Step-1:
Go to File–>New–>Test–>GUI Test–>Provide Name of the GUI test–>Provide location of the Test–>Click on Create button –>Double click on Action

Step-2
Right Click on the Action–>Select Action–>Choose the last option (as per UFT 12.2) as Call to Existing API Test/Action

Step-3
In the new window click on the browse button to get the API test–>Call to –>Select <Entire Test >
In the parameter List, we can see it is asking for the parameters required for the API Test. Hence this case it is asking for ListName and FileName (These are the parameters we created during Start)

How to Call Reusable API Script From GUI Script in UFT

Step-4
Provide some value to each of the parameters
like- listName=ListName
fileName=FileName
Click on ok

Step-5
In GUI Action we can get the entry-


RunAPITest "MyAPI","ListName","FileName"

Step-6
Now we can give actual listName and FileName and execute.

for ListName you can follow my other blogpost-How to Get List Name of a SharePoint link in UFT

Don't miss out!
Subscribe To Newsletter

Receive top technical news, lesson ideas, travel tips and more!

Invalid email address
Give it a try. You can unsubscribe at any time.

Spread the love
  • 1
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    1
    Share

LEAVE A REPLY

Please enter your comment!
Please enter your name here