can't find items

Jun 4, 2008 at 11:43 AM
Edited Jun 4, 2008 at 11:46 AM
I've got UserCntrol  controlA, with some textBoxes (named textBoxInA,   textBox2InA) and controlB in controlA with item named "textBoxInB".
And some form.


Window window = app.GetWindow("MainForm", InitializeOption.NoCache);

window.Get<TextBox>("textBoxInA").Text = "123";
window.Get<TextBox>("textBox2InA").Text = "321";

TextBox tb = createWindow.Get<TextBox>("textBoxInB");
Assert.IsNotNull(tb); //Fails here
tb.Text = "123";





Coordinator
Jun 4, 2008 at 3:04 PM
I dont know whether this is a typo, but are you sure you want to use, createWindow object on following line.

TextBox tb = createWindow.Get<TextBox>("textBoxInB");
?

If it still fails, can you send the output of window.LogStructure to me.

Jun 5, 2008 at 9:22 AM
It was

AutomationId: textBoxInB
ControlType: document

I copypasted it from another multiline textBox and forgot about it.

Thank you.
Coordinator
Jun 5, 2008 at 12:19 PM
I don't know whether it worked for you or not? If it didn't do send me the LogStructure for the window and not for the textbox/usercontrol.
Jun 6, 2008 at 8:58 AM


viveksingh wrote:
I don't know whether it worked for you or not? If it didn't do send me the LogStructure for the window and not for the textbox/usercontrol.


Setting multiline to false helped me.

Jun 7, 2008 at 8:51 AM


viveksingh wrote:
I don't know whether it worked for you or not? If it didn't do send me the LogStructure for the window and not for the textbox/usercontrol.


Setting multiline to false helped me.