Skip to content

Commit

Permalink
Merge pull request ldtp#16 from Zitrax/add_text_type_to_utils
Browse files Browse the repository at this point in the history
Let Text also handle ControlType.Text
  • Loading branch information
nagappan committed Jul 17, 2015
2 parents 2fd108a + 6f4c7aa commit 9e94e94
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Ldtpd/Text.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@ private AutomationElement GetObjectHandle(string windowName,
{
// Pane added for a bug in QT
// Ref: https://cobra.codeplex.com/discussions/450296
ControlType[] type = new ControlType[4] { ControlType.Edit,
ControlType.Document, ControlType.ComboBox, ControlType.Pane };
ControlType[] type = new ControlType[5] { ControlType.Edit,
ControlType.Document, ControlType.ComboBox, ControlType.Pane,
ControlType.Text };
try
{
return utils.GetObjectHandle(windowName, objName, type);
Expand Down Expand Up @@ -140,7 +141,7 @@ public String GetTextValue(String windowName, String objName,
return ((RangeValuePattern)pattern).Current.Value.ToString(
CultureInfo.CurrentCulture);
}
else if (childHandle.TryGetCurrentPattern(
else if (childHandle.TryGetCurrentPattern(
LegacyIAccessiblePattern.Pattern, out pattern))
{
data = ((LegacyIAccessiblePattern)pattern).Current.Value;
Expand Down

0 comments on commit 9e94e94

Please sign in to comment.