Need help - working with Web Radio Buttons - 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: Need help - working with Web Radio Buttons (/Thread-Need-help-working-with-Web-Radio-Buttons) |
Need help - working with Web Radio Buttons - newuser001 - 02-13-2008 Hi, I am using Version 9.1 of QTP and working on Web Applications using IE as the browser. I have the following 1 questions.. 1) When I log into an application, a page is displayed having WebradioButton Group (there are 2 radio buttons on the page with the same "name") and one of the buttons is selected by default (the first of the two) . I want to verify that the first radio button IS indeed selected. How can I do this? Is there any function/method to check this? 2) I have a WebTable (say 'x') in my application .. (The application actually contains many nested tables ). I have not added the 'x' object to my object repository. I have the following function in my code.. I am not able to retrieve the rowcount and columncount for the table. Code: 'Function ValidateFields(oPage) Please advise Thanks. Question 2 cont.. I tried adding the Web Table to the object repository too, Since Rowcount , and ColumnCount are test object properties. Still I cannot retrieve the valuesfor rowcount and columncount. Please advise! RE: Need help - working with Web Radio Buttons - Ankur - 02-13-2008 1) Use GetRoProperty 2) I can see that you are trying to use COM, it will not return expected value until your object supports the said method. I would suggest check with Spy which property returns rowcount and column count. Once you have the property use the same with DP in your function above. no need to add the web table to object repository since you are working with DP. RE: Need help - working with Web Radio Buttons - newuser001 - 02-14-2008 Thanks for the quick response Ankur. I updated my code based on ur suggestions.. as follows. Code: Function ValidateFields() Here , var_col2 is returning correst response and var_col1 is returning 'empty' In statement 2 above, the webTable -x has been added to Object repository and has the properties -html tag and index .And Smart Identification has been enabled (but not used ) In Statement 1 , I am using the exactly same properties to describe the object, but QTP returns - too many objects found with the same properties. I then added another property -"name" and I am still getting the same error. My GetIndex function is returning the correct value of index. Could you please advise why the object is not identified in Statement 1 here? Thanks much! RE: Need help - working with Web Radio Buttons - Ankur - 02-14-2008 Everything seems to be perfect, check once again that you are including all the properties for statement 1 If problem persists please attach the screenshot(s) of object repository and corresponding result(s) for both the cases. RE: Need help - working with Web Radio Buttons - newuser001 - 02-16-2008 Hey Ankur, The code suddenly started working today!! just out of the blue. I did not make any changes. Thanks for your time and help. Regarding the radio group button selection , you said I need to use GetROProperty. But what is the exact property I should be looking for? I have tried spying the object , but cant make out what propery i shiuld be using to validate that one of the 2 radio buttons (like the first radio button) is selected. Thanks again! |