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.
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
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.
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
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.
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.