How do I avoid Error flag in results when I test for it?
Sub Test4
Call Browsers.Item(btIExplorer).Run("http://www.yahoo.com/")
'An Object map taken from the Yahoo.com page.
'Sys.Browser("iexplore").Page("http://www.yahoo.com/").Panel("y_shade").Panel("default_p_30345150").Panel("default_p_30345150_bd").Panel("default_u_30345158").Panel("default_u_30345158_bd").Panel("yui_3_4_0_1_1343863995532_100").Link(0)
strNextLine = "http://www.yahoo.com/"
' This produces no error - as expected. ' an error - how do I get arround it?
if Sys.Browser("iexplore").Page(strNextLine).Panel("y_shade").exists then
if Sys.Browser("iexplore").Page(strNextLine).Panel("y_shade").Panel("default_p_30345150").exists then
Log.Message(strNextLine + " Is the right site")
else
Log.Message(strNextLine + " Is the wrong site")
end if
end if
call Sys.Browser.browserwindow(0).close
End Sub
Sub Test5
Call Browsers.Item(btIExplorer).Run("http://www.yahoo.com/")
'An Object map taken from the Yahoo.com page.
'Sys.Browser("iexplore").Page("http://www.yahoo.com/").Panel("y_shade").Panel("default_p_30345150").Panel("default_p_30345150_bd").Panel("default_u_30345158").Panel("default_u_30345158_bd").Panel("yui_3_4_0_1_1343863995532_100").Link(0)
strNextLine = "http://www.yahoo.com/"
' This produces an error - how do I get arround it?
if Sys.Browser("iexplore").Page(strNextLine).Panel("y_shade").exists then
if Sys.Browser("iexplore").Page(strNextLine).Panel("y_shade").Panel("default_p_30345151").exists then
Log.Message(strNextLine + " Is the right site")
else
Log.Message(strNextLine + " Is the wrong site")
end if
end if
call Sys.Browser.browserwindow(0).close
End Sub
On the TestScript Log page, I get this error: Unable to find the object Panel("default_p_30345151"). See Additional Information for details.
How doI get around this as it shows up as an error. What I need to see are teh Log Messages, and I do see them. QA Complete logs is as error even though I got what I expected. Please explain how to 'Code around' this problem.
Thanks.