The application under test has a tree view that has tree nodes which are system's drives and its' folders. There are also checkboxes for each tree items in the application.
I would have to select the folder and also select the checkbox in order to complete "Select" business process.
Below is the test code:
TreeNode tr = creatorclassic.Get<TreeNode>(SearchCriteria.ByText("My Documents"));
UIItem tr1 = (UIItem)tr;
ToggleableItem tr2 = new ToggleableItem(tr1);
if (tr2 == null)
Console.Write("tr2 is null");
tr2.State = ToggleState.On;
Console.Write("The oput put is " + tr2.State);
When the test runs - i can see that the checkbox is being selected but the application doesnt seem to understand that the "Select the checkbox" is complete as it is still throwing "Select a Folder"
However, when I manually execute the steps, the application reacts fine. Also, when I execute the same steps via UIAVerify - the application reacts fine.
The only issue is when I run the above White code.
I looked at the link: http://white.codeplex.com/workitem/3825?ProjectName=white and also the code for ToggleableItem and used it in my test code.
Not sure if there is any issue in my usage of toggleableItem with the treenode.
Iam almost stuck at this point in my test code development. Any help would be greatly appreciated.
Windows XP SP3
.Net Framework 3.5
White Release 0.21
Application - Win32Forms