getting exception on verifying textbox value

Sep 14, 2010 at 10:04 AM

 

 

 

 

 

 

 

 

I am getting exception when trying to verify the user name . Can someone please help? Thanks.

TextBox userNametextbox = Window.Get<TextBox>(SearchCriteria.ByText("User"));

 

 

 

 

userNametextbox.Text = "Employee1";

 

 

 

//Thread.Sleep(500);

 

 

Assert.Equals("Employee1"

, userNametextbox.Text);

Sep 14, 2010 at 10:35 AM

Hi

try:

string name = "Employee1"; TextBox userNametextbox = Window.Get<TextBox>(SearchCriteria.ByText("User")); userNametextbox.BulkText = name; or userNametextbox.Enter(name); Assert.Equals(name, userNametextbox.Text);
Throndorin

Sep 14, 2010 at 3:11 PM

 

 

 

 

 

 

 

It still shows the exception error. below is the code, can you please confirm. Thanks.

 

 

string

 

name = "Employee1"

;

 

 

TextBox userNametextbox = Window.Get<TextBox>(SearchCriteria.ByText("User"));

Window.SetValue("Employee1");

userNametextbox.BulkText = name

;

 

 

//password

 

 

TextBox passwordBox = Window.Get<TextBox>(SearchCriteria.ByText("Passwor));

Window.SetValue("abcd"

);

 

 

Assert.Equals(name, userNametextbox.Text);

Sep 14, 2010 at 3:21 PM

H

 

can you copy the complete error output here?

 

Throndorin

Sep 14, 2010 at 4:27 PM

This is the exception error from the Visual Studio. In the output section of VS 2010, i do not see any thing.

Sep 14, 2010 at 4:42 PM

It seems that the exception is coming because of the Asserts.Equal statement.  Asserts.Equal(name, userNametextbox.Text). Since I do not see any error in the output directory, is there a way I could have the error in the output directory so that i can copy the error here. I am new here so may be i have not enabled a setting to display errors. Infact, I donot see any error except syntax in the output section. Thanks,