Micro Focus QTP (UFT) Forums
QTP can not recognise objects on new sessions - 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 can not recognise objects on new sessions (/Thread-QTP-can-not-recognise-objects-on-new-sessions)



QTP can not recognise objects on new sessions - SUSHEEL_VIG - 07-26-2009

I am using Web, ActiveX and Terminal emulator for my test.
I have two main problems:
1.) When I run my test on a new cics session the recorded test case can not find the object TeScreen("screen28888").TeField("field167") etc. on a new cics session but no problem on already opened. the screen and field no. are dynamic and get changed with each new CICS session.

2.) I have the same problem with my web test as name of our portal web changes every time you open a new internet browser and QTP can not find the already recorded object.

There is no problem if I run the recorded test on already opened host terminal or web session where I recorded the test.

How do I solve this problem?


RE: QTP can not recognise objects on new sessions - QTPian - 07-27-2009

Hi,

Regular Expressions of QTP can resolve your problems. The following LOC may give an idea about the RegEx.

Code:
Browser("name: .*Yahoo!.*" "title: .*Yahoo!.*").Page("title: .*Yahoo!.*").WebTable("name: login").WebEdit("name: login").Set "XYZ"

Thanks,