Vierd problem with static descriptive programming - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: Vierd problem with static descriptive programming (/Thread-Vierd-problem-with-static-descriptive-programming) |
Vierd problem with static descriptive programming - Shwethareddy - 10-17-2012 Hi, The below piece of code works fine with any other website(change in title values) and am not able to get the result for my AUT. Below is the Code & Err msg. Please let me know ur inputs @ the earliest. Code: Set alllink=Description.Create Err-Msg:Cannot find the [Page] objects Parent [Browser] class (Browser).Verify that parent properties match an object currently dispalyed in your application. RE: Vierd problem with static descriptive programming - manabh - 10-17-2012 Code: Set objlink=Browser("title:=CCAMS | Home.*","micclass:=Browser").Page("title:=CCAMS | Home | 1.1.34").ChildObjects(alllink) Are you sure about the string that you are using? RE: Vierd problem with static descriptive programming - Ankesh - 10-17-2012 Can you chk if the below works? If yes then then there is something wrong with the text u r passing for browser and page. Code: Set objlink=Browser("title:=.*").Page("title:=.*").ChildObjects(alllink) Regards, Ankesh RE: Vierd problem with static descriptive programming - Shwethareddy - 10-18-2012 Hi Ankesh, Above code is working but giving a different result when i add objects to object repository and run the script. Also 1 more question -When i spy for browser object below are the object properties listed, please let me know how exactly to pass the values in the code. Browser- title:CCAMS | Home | 1.1.34 - Windows Internet Explorer name:CCAMS | Home | 1.1.34 hwd:67194 Thanks a ton Praveena RE: Vierd problem with static descriptive programming - harishshenoy - 10-18-2012 Try this out: Code: Set alllink=Description.Create Thanks , Harish Shenoy RE: Vierd problem with static descriptive programming - Shwethareddy - 10-18-2012 Hi Harish, Had tried this, but this isnt working Thanks Praveena RE: Vierd problem with static descriptive programming - Ankesh - 10-18-2012 One query here, if you are adding the object to OR, why u need to go with DP. you can directly use the Object as in OR. Just regularize the text/title property. anyways, you try the below code. | is a special character in regular expression which indicates OR. I have used escape character \. Code: Set objlink=Browser("title:=CCAMS \| Home\|.*").Page("title:=CCAMS \| Home \|.*").ChildObjects(alllink) Ankesh RE: Vierd problem with static descriptive programming - Shwethareddy - 10-19-2012 Hi Ankesh, The reason am not using OR is, have 67 webpages in the AUT for which i got to get the links. To parameterize the test am going for DP. With the below code am gettng error number - (-2147467259) Any more info plz.. Code: et alllink=description.Create Thanks Praveena |