ContributionsMost RecentMost LikesSolutionsHow do I avoid Error flag in results when I test for it?I need to test a web page to ensure it is the one I need to be on. Here are two subs that do not produce the results I expect: 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. Problems with Error Trapping the 'Set' commandI have a web page that changes the locations of items using CSS and DIVs. This is conditional, so it makes it difficult to know which panel index to do the 'Set' on. I tried to trap the error with the following code: =========================================== Err.Clear On Error Resume Next Set OrderNumtxt = panel.Panel(1).Panel(0).Panel(0).Panel(1).Panel(0).Panel(1).Panel(0) _ .Panel(1).Panel(1).Panel(0).Panel("HN_OR_OrderSummary") _ .Panel("orderSummaryZone").Panel(0).Panel(1).Panel(0) If Err.Number <> 0 Then x = 1 Else x = 0 End If msgbox(x) ' x shows up as 0 here when the 'Set' in the 3rd line fails. if x = 0 then Set OrderNumtxt = panel.Panel(1).Panel(0).Panel(0).Panel(1).Panel(0).Panel(1).Panel(0) _ .Panel(2).Panel(1).Panel(0).Panel("HN_OR_OrderSummary") _ .Panel("orderSummaryZone").Panel(0).Panel(1).Panel(0) end if ' This one 'Set's correctly and I can now assign a value to OrderNum OrderNum = mid(OrderNumtxt.innerText, 15, 13) =========================================== My test script reports errors on the first 'Set' attempt, but I need to suppress the error count. Can anyone help out on this? Thanks.How do you move VScrollBar in IE9 or resize IE9I have a web page that has a floating panel that covers the button object that my test must click. I've used the FindChild() (Thanks to Helen Kosova) to locate the object, and since it puts it in the viewable screen, that should do it, however our floating panel always floats at the bottom of the page and covers the button I have to have the script click. I've tried to find a way to scroll the page up 5-10% but TestComplete's Object Spy can't seem to identify the Vertical Scroll bar, so I'm not sure how to manage it. I also thought about resizing the page by 5 or 10% less on height to see if FindChild() can move the found panel in a position as to allow the button to be clicked. I am able to capture and show the height and width of the page, but can't seem to find a way to change the size. Set page = iexplore.pageShowRainChainsCom ' This piece searches for the panel of the item we're looking for Set panel = page.FindChild(Array("ObjectType", "ObjectIdentifier"), _ Array("ImageButton", "rlMainATC_" & sku_item & "_AC_addToCartBtn"), 100) Set myPic = Aliases.iexplore.pageShowRainChainsCom msgbox("Height is: " & myPic.height & " Width is: " & myPic.Width) Any assistance would be greatly appreciated. Re: Unable to find the object in script loop after first time thru loopHelen, Thank you so much for your response. I did manage to figure this out after taking a different approach to the problem. The sku_row and sku_col values had changed from the time I had this running in our test environment versus the values in our stage environment. Since the sku location values had changed, the sku_item would also have to change, but it wasn't. That is where the error came in. Very hard to glean the real error in the 'Unable to find the object panel("MII026_AC_Purchase")' when I could physically see it on the screen. Positionally, the panel I was looking for had changed. Thank you for your assistance. I am new to forums, so should I now unsubscribe from this thread? Unable to find the object in script loop after first time thru loopI have a script that runs through a loop and the second time tru the loop, it produces the 'Unable to find the object...' error. To ensure I can in fact see the object, I put in a msgbox if an 'if' condition can identify it just ahead of the line that tries to set a panel to that object. My script fires off the msgbox because the if condition is true, but the very next line produces this error. Here is my code snippet inside the loop: if (Sys.Process("iexplore", 2).Page("http://stage.XXX.local/outdoor/rain-chains_169132").Panel("HN_HNMC").Panel("HN_HNMC_Cont").Panel(1).Panel(0).Panel(0).Panel(2).Panel(1).Panel("dump_content").Panel(0).Panel(1).Panel(0).Panel(0).Panel(0).Panel(0).Panel(0).Panel(0).Panel(0).Panel(0).Panel(0).Panel("MII026_AC_Purchase").Panel("MII026_AC_AddToCart").ImageButton("rlMainATC_MII026_AC_addToCartBtn").Exists) then msgbox("Looks good to me!") end if Set panel = page.Panel("HN_HNMC").Panel("HN_HNMC_Cont").Panel(1).Panel(0).Panel(0) _ .Panel(2).Panel(1).Panel("dump_content").Panel(sku_row).Panel(sku_col) _ .Panel(0).Panel(0).Panel(0).Panel(0).Panel(0).Panel(0).Panel(0).Panel(0).Panel(0) _ .Panel(sku_item + "_AC_Purchase") _ .Panel(sku_item + "_AC_AddToCart") _ .ImageButton("rlMainATC_" + sku_item + "_AC_addToCartBtn") XXX is my local address. Any assistance would be greatly appreciated. I've spent far too much time on the issue already. Thanks rjamison