Micro Focus QTP (UFT) Forums
Regd Run time field change - 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: Regd Run time field change (/Thread-Regd-Run-time-field-change)



Regd Run time field change - kishore - 09-17-2011

Hi all,
i am a beginner and i have query.
i am trying to write a qtp script for a website field which changes at run time. so can some one tell me hoe to processed the script.


RE: Regd Run time field change - Gopimanohar - 09-18-2011

can you tell me what field exactly changing in Web page. Using Reg expression we can change this...


RE: Regd Run time field change - kishore - 09-18-2011

Consider a web site gets input like first name middle name last name dob etc... when i record and play back i found that these fields are changing every time. i mean the property values which i capture via object spy changing


RE: Regd Run time field change - KavitaPriyaCR - 09-19-2011

There must be some property, which will stay same. Say for example nativeclass, create description using that property.
OR
Record entering the value into that field multiple times, you may get some idea.


RE: Regd Run time field change - Acharya_silu@yahoo.com - 09-21-2011

Ans:
Hi,
If a field value is changing at run time then you can do like this :
1-If the webTable Value is changing,then you can use the GetCell data of that webtable and compare it with your datatable values.

Ex:
Code:
Browser("Browser").Page("Page").Frame("content").webTable("Webtable").Getcelldata(rows,columns)
.

2-If your browser or page is changing then you can use Regular expression for that(.*)
Ex:
Code:
Browser("name:=Browser.*").Page("name:=Page.*")........

Thank you


RE: Regd Run time field change - susangeet02 - 09-22-2011

Hi ,

Yes it happens many times while using qtp . For that you need to go with some options like using of Regular expression( .*) .It happens due to the Browser of the application ,which may not be recognized by the tool if it gets upgrade.

For example:
Code:
"   Browser("Browser").Page("Page").Webedit("UserID")."

So sometimes the Name of the Browser (or) the Name of the Page may get change, like Browser("Browser1")gets changed from Browser("Browser").

For this you need to use Regular Expression. Like:

Code:
" Browser("name:=Browser.* ").Page("name:=Page.* ").Webedit("UserID")."

There is a button called "Object Spy" in QTP tool . Always try to use Spy button to know about the changes in Browser ,Page ..etc in the application.

Thanks