Ask a Question

How can we create the login class separate and utilize for the whole project instead of login steps

Amna
Occasional Contributor

How can we create the login class separate and utilize for the whole project instead of login steps

I want to automate my scripts like that instead of writing login steps in each test script I want to create a separate login file so that I can utilize that file in each script... Is there any solution for this kindly help

3 REPLIES 3
mikef
Staff

Hi @Amna 

 

Yes, you can copy the login steps out to a new keyword test (click the plus symbol next to the KeywordTest repository in Project Explorer), paste the operations (or record the operations), then you can drag-and-drop that keyword test into any existing test. Or, you can organise your Execution Plan to perform the login test, then run the subsequent tests.

 

Hope this helps,

Mike.

Amna
Occasional Contributor

But I am using scripts test not the keyword test

Hi @Amna 

 

Apologies, yes you can also define a script method to perform your login steps then call that from other tests. More information for the specific usage is available here : https://support.smartbear.com/testcomplete/docs/scripting/calling-routines/index.html 

 

Hope this helps

Mike

 

cancel
Showing results for 
Search instead for 
Did you mean: