Raido Group - Select first in list - 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: Raido Group - Select first in list (/Thread-Raido-Group-Select-first-in-list) |
Raido Group - Select first in list - Scott M - 12-30-2010 Hello, Is there any way to have QTP select the first radio button? There are 9 visable radio selections, I use a search string to bring the desired raido button to the top of the list. In this case it was ("7"). How can I get QTP to always select the first button after running a search string? Example: Code: Browser("XXX").Dialog("Explorer User Prompt").WinEdit("Enter search string:").Set "George Washington" RE: Raido Group - Select first in list - Ankur - 12-30-2010 Code: Browser("XXX Landing").Page("XXX Landing").Frame("TargetContent").WebRadioGroup("SINGLE_SELECT_GRID$sels$0").Select #0 RE: Raido Group - Select first in list - Scott M - 12-30-2010 When I ran the script using Select #0, I get a Syntax error. The test run cannot continue due to a syntax error. Syntax error Line (19): Code: "Browser("MSS Landing").Page("MSS Landing").Frame("TargetContent").WebRadioGroup("SINGLE_SELECT_GRID$sels$0").Select #0" This is the code I am using is: Code: Browser("xxx").Page("xxx Landing").Frame("TargetContent").Link("Find").Click Thank You, -Scott RE: Raido Group - Select first in list - cdesserich - 12-31-2010 Make sure to put #0 in quotes: Code: Browser("XXX Landing").Page("XXX Landing").Frame("TargetContent").WebRadioGroup("SINGLE_SELECT_GRID$sels$0").Select "#0" RE: Raido Group - Select first in list - Scott M - 01-04-2011 Thak You for the Syntax correction. The .Select "#0" worked. I ran into another issue. As long as I record entering the search word "George Washington", my script works. As soon as I link to a data sheet or change the .Set value (example: "Betsy Ross") the lookup box is populated with correct text but, a "Search string not found" error is displayed. Any ideas would be appreciated. Example: Code: Browser("XXX").Dialog("Explorer User Prompt").WinEdit("Enter search string:").Set "George Washington" RE: Raido Group - Select first in list - UFTEnthusiast - 01-04-2011 Hi Scott, Add wait 1 statement before and after your statement . Thanks, RE: Raido Group - Select first in list - Scott M - 01-08-2011 That worked. Thank You! RE: Raido Group - Select first in list - UFTEnthusiast - 01-11-2011 Wonderful. It's great to hear that it worked. Wait statements are very critical in application execution and debugging. Have a great day! UFTEnthusiast |