Micro Focus QTP (UFT) Forums
trouble with pull down menus and data tables. - 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: trouble with pull down menus and data tables. (/Thread-trouble-with-pull-down-menus-and-data-tables)



trouble with pull down menus and data tables. - purailin - 05-15-2008

I am trying to write a test case where it registers a new user each time it is ran. I set up the test with a global data table to use in each field on the registration form. The problem is that the registration form on the app has pull down menus for state and country. I have columns in my table for that information and I have code that tells QTP what to put in there. this is an example of one line of the code:

Code:
Browser("FindAResident").Page("FindAResident").WebList("state_cd").Select DataTable("STATE_CD", dtGlobalSheet)


When I try to run the test, it hangs on this step and gives me an error that says "Cannot identify the specified item of the state_cd object. Confirm that the specified item is included in the object's item collection."

How do I fix this? I have tried to update the object in the Object Identifier and I am either not doing it correctly, or its not working.


RE: trouble with pull down menus and data tables. - purailin - 05-15-2008

Oh btw, this does work if I write a test that inputs information that is specified directly in the script. But the person is registered each time I run it, so if I want to run the test again, I have to insert a new person with new data. Thought using a data table would be easier.


RE: trouble with pull down menus and data tables. - somisays - 05-15-2008

Dear puralin,
Can you please check the object repository whethe state_cd is there in it.If not you have to add the object.

Regards
Sridhar


RE: trouble with pull down menus and data tables. - purailin - 05-16-2008

Sridhar.

I checked this. The state_cd is located in the object repository.


RE: trouble with pull down menus and data tables. - somisays - 05-16-2008

Hi,
Please Relearn the object state_cd in the object repository and save and run the test.

Regards
Sridhar


RE: trouble with pull down menus and data tables. - purailin - 05-16-2008

Relearn? Do you mean record again?


RE: trouble with pull down menus and data tables. - somisays - 05-16-2008

You have a option in the Object Repository screen ..
Relearn means only you are learning that perticular object from the application.

Regards
Sridhar


RE: trouble with pull down menus and data tables. - somisays - 05-16-2008

Hi,
I mean u have to use Update From Application.
first Highlight the Application and then Highlight the object in the object repository and click on Update From Application Icon.

Regards
Sridahr


RE: trouble with pull down menus and data tables. - purailin - 05-19-2008

OK. I tried that. It didn't work. I think the problems lies with the button you click to get the list. I can't get QTP to reconize that as a separate object.