Problem selecting in a dropdown menu during playback. - 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: Problem selecting in a dropdown menu during playback. (/Thread-Problem-selecting-in-a-dropdown-menu-during-playback) |
Problem selecting in a dropdown menu during playback. - qemls29 - 11-24-2011 I have a problem selecting a value for a dropdown menu during playback. I'm getting the error: "Object is disabled". During playback, the dropdown menu responds to a Click with the code: Code: Browser( "Browser" ).Page( "Page" ).WebEdit("default value:=ABC").Click Code: Browser( "Browser" ).Page( "Page" ).WebEdit("default value:=ABC").Set "XYZ" Code: Class Name = WebEdit RE: Problem selecting in a dropdown menu during playback. - krr - 11-24-2011 Is it WebEdit or Menu? RE: Problem selecting in a dropdown menu during playback. - ravi.gajul - 11-24-2011 Try this, Code: Browser( "Browser" ).Page( "Page" ).WebEdit("html id := ctl00_ctl00_cpMainBody_childCPMainBody_radCourseDeliveryType_Input RE: Problem selecting in a dropdown menu during playback. - qemls29 - 11-24-2011 It's a drop down menu, which records and Object Spy sees as WebEdit. Thanks. RE: Problem selecting in a dropdown menu during playback. - qemls29 - 11-28-2011 I tried using the html id, but still get the error "Object is disabled". Thanks. RE: Problem selecting in a dropdown menu during playback. - vIns - 11-29-2011 Hi... Object Spy clearly shows that the object is readonly. So, you will get 'Object is disabled' error. If u want to change the readonly property to editable field, you can use below code. Code: Browser("Browser").Page("Page").WebEdit("WebEdit").Object.readOnly=false Code: Browser("Browser").Page("Page").WebEdit("WebEdit").Set "vins" Can u attach the screen shot of the page if it does not work? RE: Problem selecting in a dropdown menu during playback. - kotaramamohana - 11-29-2011 Hi Friends, I am also getting same problem in my application. QTP is setting value in the Edit box. But could not able to select correct option from drop down. It meas drop down list is not displaying while doing with QTP. If we are trying manually then list is getting displayed. Here is the properties for WebEdit object Code: "Class Name:=WebEdit", I have attached screen shot of my application. Can you please share your thoughts RE: Problem selecting in a dropdown menu during playback. - qemls29 - 11-29-2011 It works like a charm. Thanks! RE: Problem selecting in a dropdown menu during playback. - shirly - 05-22-2015 Can you provide me the script, how did you resolve this? RE: Problem selecting in a dropdown menu during playback. - Sharan - 07-28-2015 Hi qemls29, I'm facing same issue, How did you got it working? In my application, I've WebEdit object called 'time_zone' Manually: If I type India, I get it in the drop down(already highlighed), Then press ENTER. I'm unable to do same thing in UFT. Any suggestion would help. I tried SendKeys and FireEvent but didn't work. -Sharan |