Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
type mis match
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi Friends I am new to qtp pleze help me out,
i have created a function lirary and associated it to a test
when i am calling a function in in the test its working properly but when i am calling a function in function library ( the function which is placed in Test )
it was giving a type mismatch error how to solve it...

Ex:
*** test***********
Code:
login
function create(buttion1)
buttion1.click
end function
******in fun lib****************
Code:
Function login
create(obj_buttion)
End function
*************************

That is the code, calling a fun from lib to test is possible or not..
when i try this i was getting a "type mismatch error"
Reply
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
This error comes when you have not defined the function.

Yes, you can call a function from library in your test.

As i can see you are using two functions.. but one of them is defined in test and the other one in your library.

******in fun lib****************
Function login
create(obj_buttion)
End function
*************************

In your library you are trying to use the function Create, which is defined in your test. Hence you are getting the type mismatch error.

Please place both the functions in your library and then use them.

Regards,
Ankesh





Reply
#3
Solved: 11 Years, 3 Months, 3 Weeks ago
Thank You...Mr.Ankesh
as You said "place both the functions in your library and then use them"
But i Want to place that function in test for the need of clicking the button which i want for the next scenario so i can use the lib again...
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question Is there a way to create dynamic objects by declaring the type of object as parameter lotos 3 2,206 11-08-2017, 11:15 PM
Last Post: lotos
Sad QTP Script | how to get object of some open window just using its class type,Java sophia.sabir 1 8,872 08-07-2013, 01:26 PM
Last Post: anil2u
  impossible to pass a parameter of type 64 bytes in a webservices dosreis 0 2,168 06-21-2013, 01:55 AM
Last Post: dosreis
  How to find the Browser type at runtime? Rahull 1 3,198 09-14-2012, 09:22 PM
Last Post: SteveS
  ADO data type for VarChar2 in oracle. ayadav 0 1,788 11-30-2011, 09:09 AM
Last Post: ayadav

Forum Jump:


Users browsing this thread: 2 Guest(s)