DropDownMenu: textValue attribute is not saved

Class library usage, coding and language questions.
chfischer
Posts: 20
Joined: Fri Jan 14, 2011 10:44 am

DropDownMenu: textValue attribute is not saved

Post by chfischer » Mon Mar 14, 2011 2:55 pm

Hi

Instead of clicking on the dropDownMenu and selecting the menuEntry, I am able to use the dropDownMenu as a textField.

I use it like this:
repo.Text__Currency.TextValue = "USD";

This way works a lot quicker and I need only one repository item, but the dropDownMenu "forgets" what ever is enterd after I click save.
Do I have to "commit" this entry somehow? or how to do this the easiest way?

Clicking around needs a lot of time compared to just setting this values (like I would do with a textField).

Ideas are very welcom!

Regards,
Christian

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: DropDownMenu: textValue attribute is not saved

Post by Ciege » Mon Mar 14, 2011 4:56 pm

So it looks like you are just setting the text value of your dropdown to "USD". Unfortunately, your AUT is expecting a click to happen to set the parameters of the dropdown to the item selected. It may be that there is an onclick fire event that needs to happen in the background when you actually click on an item that is not happening when you just set it's text value.

So, you need to either figure out what other properties of the dropdown need to be also set (like selected index or similar) -OR- determine what onclick event needs to be triggered and trigger that yourself -OR- just write the code to click the item and allow the AUT to operate as intended.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: DropDownMenu: textValue attribute is not saved

Post by Support Team » Mon Mar 14, 2011 7:47 pm

As ciege already wrote, this depends on the implemention of the control. It might be sufficient to generate key press on the "Enter" key...

Regards,
Alex
Ranorex Team
.
Image