How do we select the dynamic values in drop down list in loadrunner at runtime or we can say how do i can select 2nd item from drop down list at each run. If anybody can tell the answer please send it across, as I need to implement it as soon as possible
Re: How do I can select 2nd item from drop down list
In the web(HTTP/HTML) protocol, you will need to manually adjust the script itself to do this.
If the second value in the list may be different each time the page is returned, you will need to capture the second value using the web_reg_save_param() function.
i.e.
web_reg_save_param("SecondVal", "LB=", "ORD=2");
Once the second value is captured, it can be used in the web_submit_data() function that sends the value of the drop down list back to the server.
In the web Click and Script protocol, this is much easier as the web_list() function has a "SelectByOrdinal=" option.
Re: How do I can select 2nd item from drop down list
I have a problem which is kind of an extension of this issue...I'm getting back a set of search results (training classes), and I want to have QTP identify where the training class I've just created is in this list and click its associated Delete icon. I know I can parameterize the name of the training class, but the Delete icon is a separate object from the name of the class. So how do I get QTP to know "The new training class is the fifth (for example) item in the list, so I need to click the Delete icon in the fifth row"?