Micro Focus QTP (UFT) Forums
QTP Input Data without Repository - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: QTP Input Data without Repository (/Thread-QTP-Input-Data-without-Repository)



QTP Input Data without Repository - tsmith - 03-12-2012

Hi Guys,

I am having a problem trying to input the username and password into the demo webpage at newtours.demoaut.com. I want to do this without using an object repository but the following code doesn't work.

Code:
Browser("Title:=.*").Page("Title:=.*").WebEdit("name:=userName").Set "xxxx"
   Browser("Title:=.*").Page("Title:=.*").WebEdit("name:=password").Set "xxxx"
   Browser("Title:=.*").Page("Title:=.*").Image("name:=login").Click

Why doesn't the browser recognize the properties?

Thanks


RE: QTP Input Data without Repository - Sathiya - 03-12-2012

hi,
try with the following code and let me know


Code:
browser("CreationTime:=0").Page("title:=Welcome: Mercury Tours").WebEdit("name:=userName").Set "Hello"
browser("CreationTime:=0").Page("title:=Welcome: Mercury Tours").WebEdit("name:=password").Set "Hello"
Browser("CreationTime:=0").Page("title:=Welcome: Mercury Tours").Image("file name:=btn_signin.gif").Click



RE: QTP Input Data without Repository - vIns - 03-12-2012

It works just fine.
i could not see any issues here...


Code:
Browser("Title:=.*").Page("Title:=.*").WebEdit("name:=userName").Set "xxxx"
Browser("Title:=.*").Page("Title:=.*").WebEdit("name:=password").Set "xxxx"
Browser("Title:=.*").Page("Title:=.*").Image("name:=login").Click


If it does not work, are u getting any error message?