dropdown selection problem - 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: dropdown selection problem (/Thread-dropdown-selection-problem) |
dropdown selection problem - nadirowski - 04-27-2011 Hi, I'm recording a test, in which I select a value from dropdown list. Selecting a value does a page refresh (form submit). I also have a js script which blocks form submission, if there is already a request in progress. With QPT i'm always getting an error message from this js script (request is already in progress) when trying to select a value from a dropdown. The page is loaded, because i can select the value manually without a problem when i run the test and pause just before selecting a value from dropdown. Any hints? RE: dropdown selection problem - Jay - 04-27-2011 could u please explain clearly i m not clear with your problem. what i can get from you sentances is that script line is getting executed while application is in loading process. if this is the problem then put wait statement before that line. Wait 20 ' to wait 20 seconds RE: dropdown selection problem - vIns - 04-27-2011 Hi, Are you saying that QTP is trying to select when the page is actually loading.? If i have understood ur question correctly, Please use Browser("....").Sync to ensure that page is fully loaded RE: dropdown selection problem - UFTEnthusiast - 04-27-2011 Hi, Please add some wait time before and after selection of dropdown. Hopefully it should work. Thanks, UFTEnthusiast RE: dropdown selection problem - nadirowski - 04-27-2011 I'll try to explain more clearly... I have a test that selects a value from a dropdown list. There is a javascript function on this dropdown, that submits the form on change. There is also another javascript on it, that shows up a alert dialog with "request is already in progress" if you try to submit a form while a page is loading (ie a doubleclick on submit button). If I manually select a value from a dropdown, the webpage refreshes without a problem (form is submitted). If I execute the qpt step that selects a value from a dropdown, i get "request is already in progress" message. It looks like qpt somehow "doubleclicks" the dropdown. I have tried waiting up to 10 minutes, and this does not help. Below a simple script that I've recorded Code: Browser("MyApp").Page("MyApp").Frame("login").WebEdit("name").Set "oasis" When I choose "run to step" option, and stop before the last line, I can select the value manually without a problem. If I run the last step, I get the popup error message. RE: dropdown selection problem - vIns - 04-27-2011 Can u plz try this and let us know if it works Code: Browser("MyApp").Page("MyApp").Frame("login").WebEdit("name").Set "oasis" ~vIns~ RE: dropdown selection problem - nadirowski - 04-27-2011 Unfortunately this does not help |