>

QTP tricky questions with answers

1. What is the difference between Loadfunctionlibrary and Executefile?

a. ExecuteFile -It loads the libraray at run time but with no debugging support.

Loadfunctionlibrary – It also loads the library at runtime.Here debugging is possible at runtime

b. ExecuteFile- we can load only single libraray using call executefile statement for eg:”C:\func1.vbs”

Loadfunctionlibrary -But here we can load multiple function libraries using call loadfunctionlibrary for eg: “C:\func1.vbs”,”C:\func2.vbs”

 2.Which one is called  when 2 functions having same function name but in 2 different function library?

a.It uses the function from the function library which has the highest priority.

3.Which fuction is called if the loadfunctionlibraray calls the vbs file which has the same function name as that of the associated function library?

a.The function present in the loadfunctionlibraray calls .

4.What are the four ways of adding function library?

a.1) We can directy associate using File> Settings>Resources>libraries clicking on the ‘+’ symbol and then providing the file path.

2) we can use the executefile method.

3) We can use the loadfunctionlibrary

4) By using the automation object model that is AOM.

Leave a Reply