HtmlEdit box with given id is not present on the browser but below exists statement show true. Amazing............
Dim CUITBrowserWindow as UITestControl
CUITBrowserWindow.SearchProperties.Add(New PropertyExpression(UITestControl.PropertyNames.Name, "ABC", PropertyExpressionOperator.Contains))
htmldoc As New HtmlDocument(CUITBrowserWindow )
Dim edit As New HtmlControls.HtmlEdit(htmldoc)
If edit.Exist then
Please let me know if went wrong anywere.miércoles, 22 de diciembre de 2010 12:08
Todas las respuestas
I have come across similar incident. After investigating, I found out that the my control was actually exist on the page. It was not seen on the page because it was hidden.
you check whether the control is exist.... it may be exist but hidden...
Yours may be the same mine. You can try to verify by right-click on your page then click on "view source" then search for your control. see if there is hidden attribute.miércoles, 22 de diciembre de 2010 18:53
First, disable Smart Match algorithm (i had some issues long time ago because of it: http://social.msdn.microsoft.com/Forums/en-US/vsautotest/thread/ddf50fd4-d788-4333-8cf1-0cc2f3941fd3/):
Playback.PlaybackSettings.SmartMatchOptions = SmartMatchOptions.None;
After that try again to see if the Exist method return true.
If it is still returning true, in IE, use Internet Explorer Toolbar (open it) and check how many textboxes with the id "Vijay" exists in the page. If it is just only one, and the Smart Matching Algorithm is disable, than there is a problem (until now, I didn't meet such issues with the Smart Algorithm Disabled). In this case, just post the page source and the object definition (like in your previous example).miércoles, 22 de diciembre de 2010 19:05