Wednesday, December 12, 2012

QTP2: Shared object repository

Shared object repository

File extension: .tsr

For working in QTP, tester should have proper knowledge about the object repository. Tester can locate the object on object repositry then store it to with .tsr file,after that this shared object repo. can be use with any actions.

Shared object repository can reduce the time of tester for, creating again the repo and and locate the object in the repository for all repeating actions. 

Sunday, December 2, 2012

QTP 1: Date and Time



'Current date
dtmTest = DateValue(Now)
msgbox dtmTest

'Current time:
dtmtime=timevalue(now)
msgbox dtmtime

'Current Week
week=weekday(now)
msgbox week


today_day=weekdayname(1)
msgbox today_day

current_month=month(now)
msgbox current_month

strDOW = WeekdayName(Weekday(Now))
msgbox strDOW

current_year=year("01-07-2012")
msgbox current_year

msgbox now


msgbox datediff("d","01-01-2009","01-01-2010")
msgbox datediff("m","01-01-2009","01-01-2010")
msgbox datediff("YYYY","01-01-2009","01-01-2010")