Menu

#80 Select item from ListBoxTester

open
nobody
None
5
2005-03-16
2005-03-16
Anonymous
No

Hi
I´m beginning wit NUnitAsp, and my problem is that i
need to select a item from a ListBoxTester to test if a
panel is open correctly.
I try it in differents ways but i can´t.
Thanks for any help.
Regards.

Discussion

  • Naeem S.

    Naeem S. - 2005-04-07

    Logged In: YES
    user_id=1121564

    Hello,

    What are you trying? Show us some code.

    I've done this in the following way:

    <code>
    DropDownListTester lstCountry = new
    DropDownListTester("lstCountry", CurrentWebForm);

    Browser.GetPage("http://localhost/mypage.aspx");

    lstCountry.SelectedItem.Value = "uk";
    </code>

    Does this help?

    Regards,
    Naeem

     
  • Nobody/Anonymous

    Logged In: NO

    To solve this problem, I clicked the validation of the page, then checked its value.

    Previously I was getting a null value after I had a selected index.

    psuedo code example{

    create dropdownlist

    dropdownlist.SelectedIndex = some number;

    page submit (usually I work with forms, usually a buttonTester.click()).

    check the value of selected item. (is no longer null).
    }

    if my dropdownlist.SelectedValue is before that page submit, Nunit said the value was set to null.

     
  • Nobody/Anonymous

    Logged In: NO

    To solve this problem, I clicked the validation of the page, then checked its value.

    Previously I was getting a null value after I had a selected index.

    psuedo code example{

    create dropdownlist

    dropdownlist.SelectedIndex = some number;

    page submit (usually I work with forms, usually a buttonTester.click()).

    check the value of selected item. (is no longer null).
    }

    if my dropdownlist.SelectedValue is before that page submit, Nunit said the value was set to null.

     

Log in to post a comment.