Yes , We can use Instr method
Example:-
ReturnValue= Instr(1,"UFTQuestions","Questions")
Return 0 if the string is not found other wise returns the starting Position at which match is found
In our case
ReturnValue will return 4
To check it run the below code in QTP/UFT
Syntax
ReturnValue= Instr(1,"UFTQuestions","Questions")
Msgbox ReturnValue
Example:-
ReturnValue= Instr(1,"UFTQuestions","Questions")
Return 0 if the string is not found other wise returns the starting Position at which match is found
In our case
ReturnValue will return 4
To check it run the below code in QTP/UFT
Syntax
ReturnValue= Instr(1,"UFTQuestions","Questions")
Msgbox ReturnValue
No comments:
Post a Comment