Fixed WaitForVisible commands, and changed silverlight windows tag to "silver"

Fixed WaitForVisible command was incorrectly displaying errors when it
couldn't find a window.
Changed the tag used for Silverlight Windows to "silver".
This commit is contained in:
Edward Jakubowski
2014-04-09 19:27:13 -04:00
parent 7fa68a9309
commit be44a8e38b
8 changed files with 86 additions and 8 deletions

View File

@@ -116,15 +116,16 @@ public class BaseCommand {
resultStr = item;
break;
}
if (WinPtr.isWpfRuntimeIdFormat(resultStr))
if (WinPtr.isWpfRuntimeIdFormat(resultStr)) {
result.runtimeId = resultStr;
if (!ignoreFailedFind && result.isEmpty())
appendError("Error: Failed to find window handle matching: " + xpath);
}
else {
result.hWnd = Api.GetHandleFromString(resultStr);
if (!api.user32.IsWindow(result.hWnd))
appendError("Error: Failed to located HWND(" + resultStr + ") from : " + xpath);
if (!ignoreFailedFind && !api.user32.IsWindow(result.hWnd))
appendError("Error: Failed to locate window HWND(" + resultStr + ") from : " + xpath);
}
if (result.isEmpty())
appendError("Error: Failed to find window handle matching: " + xpath);
return result;
}