Hepl required to dyanamically identified username and create the object in object rep - 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: Hepl required to dyanamically identified username and create the object in object rep (/Thread-Hepl-required-to-dyanamically-identified-username-and-create-the-object-in-object-rep) Pages:
1
2
|
RE:Hepl required to dyanamicallyidentified username and create theobject in objectrep - Saisu - 11-24-2011 Hi Ankesh, Added the customer search results in OR still getting same error The "Customer Record Search Results" object was not found in the Object Repository. Check the Object Repository to confirm that the object exists or to find the correct name for the object. Line (73): Code: "strResultMsg= Browser("Browser").Page("Page").Frame("workarea").WebElement("Customer Record Search Results").GetROProperty("innertext")". help you identify and update your steps and/or the objects in your repository. Attached screen shot too. RE:Hepl required to dyanamicallyidentified username and create theobject in objectrep - Saisu - 11-25-2011 Hi Ankesh, Now am not getting the error i added OR in workarea_2 and updated code as like below. Code: strResultMsg= Browser("Browser").Page("Page").Frame("workarea_2").WebElement("Customer Record Search").GetROProperty("innertext") Now the problem is ... in the page it showing 0 records am not getting mssgbox prompts seems loops is not working... Am running on debug mode Code: strResultMsg= Browser("Browser").Page("Page").Frame("workarea_2").WebElement("Customer Record Search").GetROProperty("innertext") .... F11 cursor moving to And my innertext contains so much data just we need 1 OR record can i use regular expression in inner html . Please have look and show the way for issue solution Thanks, Saisu RE: Hepl required to dyanamically identified username and create the object in object rep - Ankesh - 11-25-2011 Can u plz Spy the object and check that "0 records returned" msg is reflecting under which property of the object? The reason that u r not getting the msgbox prompt may be that the innertext property holds some other value. Plz paste the scpy window screenshot for the object. Regards, Ankesh RE:Hepl required to dyanamicallyidentified username and create theobject in objectrep - parminderdhiman84 - 11-25-2011 in your repository WebElement("Customer Record Search Results") is a child of workarea_2 and in script you have mentioned workarea. So use below line: Code: strResultMsg= Browser("Browser").Page("Page").Frame("workarea_2").WebElement("Customer Record Search Results").GetROProperty("innertext")" RE: Hepl required to dyanamically identified username and create the object in object rep - Saisu - 11-25-2011 Hi Ankesh, Yes the inner textis having the "customer search " it should have 0 or 1 record search .... how can i change the value will come as part of running the test ... my doubt is if i changed to 0 record search and what will happen if it is having 1 record search . Attached spy screen shot Thanks, Saisu RE:Hepl required to dyanamicallyidentified username and create theobject in objectrep - Ankesh - 11-25-2011 Hi Saisu, Got the problem. You object has large text with the expected msg in it. something like [xyzvjhjgjhhjh "O Records Found" hsgfjhskh] I have modified the code accordingly. Can you please tell me from where are you picking the value for GEOVoIPnumber. Does it change everytime? if not.. use the below code...... '-------------------------------CODE-------------------------------- Code: intFlag = 0 '-------------------------------END------------------------------------ If you need to change the value of GEOVoIPnumber every time the above code will work with slight modification. Code: intFlag = 0 I hope this will work for you this time. Regards, Ankesh RE: Hepl required to dyanamically identified username and create the object in object rep - Saisu - 11-25-2011 Hi Ankesh, Am taking these Geonumbers from excel and each and every time it varies ...... If it returns 0 have to do one task and if it returns 1 have to do one task . After completing the tasks and will get the another Geo from excel and again it has to search and based on the result it has to proceed and then thrid geo from excel. Code for to get the required data is ===== GEOVoIPnumber=mysheet.cells(i,8).value ==== Tried the above code and got the below error Object doesn't support this property or method: 'Browser(...).Page(...).Object.innertext' Line (76): "strResultMsg= Browser("Browser").Page("Page").Object.innertext". Thanks, Saisu RE:Hepl required to dyanamicallyidentified username and create theobject in objectrep - Saisu - 11-25-2011 Hi Ankesh, Now am not getting the error however loops are not working now also i updated the code to Code: strResultMsg= Browser("Browser").Page("Page").Object.body.innertext Loops are not working . Code: intFlag = 0 Thanks, Saisu. RE: Hepl required to dyanamically identified username and create the object in object rep - Ankesh - 11-28-2011 GEOVoIPnumber=mysheet.cells(i,8).value is wrong as there is no such variable 'i' we are using. So there wont be any value in variable i. So the above statement wont work. I would suggest that if you are not clear with the concept of loops, plz refer to QTP help. Plz let me know where you have kept the data which you would be incrementing and using as search value. Regards, Ankesh RE: Hepl required to dyanamically identified username and create the object in object rep - Saisu - 11-28-2011 Hi Ankesh, The Geo number is taking from the excel sheet every time and no proble m with that ....And i used your above with out changing of number however no luck the cursor is not at all touching the loops seems the problem with the grepping the innertext i guess. Thanks, Saisu |