Contributions
Re: Need a clever way to determine if an object is still visible on the screen
Manfred_FI checked every property of the button before the popup is displayed and after the button is displayed. Every single property is the same, there are no differences. What I did was create a button1 and Set that before the popup is displayed, and a button2 and set that after the popup is displayed. Each object had the exact same properties. RavikThanks for the suggestion, it worked! After I click the button once, I try to get the button again: Set btn_Detail_Ok = page.FindChildByXPath("//*[@id='levelOfDetailDialog_ACTION_1'][@name='Ok'][@tabindex='2002']", True) Then, if btn_Detail_Ok is still there, click it again. 'If the Ok button still exists, click it again If Not btn_Detail_Ok Is Nothing Then btn_Detail_Ok.Click Log.Message("Clicked Ok button again") End If1.7KViews0likes0CommentsNeed a clever way to determine if an object is still visible on the screen
During my automation, I have a small popup that I have to select some radio buttons on and then an OK button that I need to click, but occasionally when I click it the click does not register, so I need to click again to close the popup. I'm getting the object by: Set btn_Detail_Ok = page.FindChildByXPath("//a[@name='Ok']", True) My first attempt was to just check if it Exists after we click it once: 'Get the Ok button on the Level of Detail Options popup Set btn_Detail_Ok = page.FindChildByXPath("//a[@name='Ok']", True) btn_Detail_Ok.Click Log.Message("Clicked Ok button") aqUtils.Delay(2000) 'If the Ok button still exists, click it again If btn_Detail_Ok.Exists Then btn_Detail_Ok.Click Log.Message("Clicked Ok button again") End If But this does not work because the OK button exists all the time. To test this, I added this line of code before the small popup appears: Set btn_Detail_Ok_Dup = page.FindChildByXPath("//a[@name='Ok']", True) And sure enough, I get the correct object. I've looked at all of the properties of the object (visible, enabled, disabled, visibleOnScreen) and they're all the same. I'm looking for another way I can determine if we need to click the button again. Any ideas are appreciated.Solved1.8KViews0likes4CommentsRe: External table is not in the expected format.. Was working before, now it's not.
djadhav wrote: I had faced similar issues with Excel 2013 files. One workaround I found is to open the file before running any reading commands. djadhavThanks for the response. What method did you use to open?10KViews0likes2CommentsExternal table is not in the expected format.. Was working before, now it's not.
I'm trying to look at two .iif files for comparison of their data. The following lines of code are throwing an error for me: 'Get the two files we need. We will use the original file to verify the data in the exported file Set exported_file = DDT.ExcelDriver("J:\Enterprise\A_09170888_01-06.iif", "A_09170888_01-06", True) exported_file.Name = "exported_file" Set expo_driver = DDT.DriverByName("exported_file") Set original_file = DDT.ExcelDriver("J:\Enterprise\A_09170888_11-25.iif", "A_09170888_11-25", True) original_file.Name = "original_file" Set orig_driver = DDT.DriverByName("original_file") The error gets thrown on the Set. "External table is not in the expected format." The strange thing is that this was working for me previously and nothing has changed with the two files I'm using. I can go back through my Test Logs and see the successful runs of it working. Does anyone have any idea what could be the problem here? I've also tried restarting Test Complete and that didn't do it.Solved10KViews0likes4CommentsRe: Changing the location in Save As dialogue popup
HiAlexKaras First off, thanks for the information! A few things with the SaveFile method. 1) Is it possible to just change the location of where we want to save the file, but not the file name? Right now, the file name is being set to the path where we want to save. It does however navigate to the correct path, I would just like to keep the name the default of what it is in the prompt. 2) The cursor ends up ON the Save button, but never clicks it.I have to explicitly click the Save button. All examples of SaveFile that I've seen don't include this. Any ideas? Here is my code: Sub Test1 Dim browser, location, ldap 'Get the currently logged in user's ldap. ldap = CreateObject("WScript.Network").UserName 'Get browser object Set browser = Aliases.browser 'Click the small arrow next to the Save Button to display other Save options Call browser.BrowserWindow2.FrameNotificationBar.Notification.Save.Item.Click(10, 12) 'Click Save As Call browser.wnd32768.Click(79, 33) 'The location where we want to save this file location = "J:\SavedFiles\"& ldap 'SaveFile method will change location and prepare to Save Aliases.browser.dlgSaveAs.SaveFile location 'Click Save button Sys.Browser("iexplore").Window("#32770", "Save As", 1).Window("Button", "&Save", 1).Click2.5KViews0likes1CommentChanging the location in Save As dialogue popup
Hi all, I'm trying to download a file from a webpage using IE as my browser. How it works is, I click a link called Download Selected File and then I'm prompted with the small bar at the bottom of the page that says.. "Do you want to open or save...." I click the arrow next to Save, and then click Save As. I'm then prompted with the Save As window, which is where I would like to change the location. What I originally planned on doing is adding the location field and setting it's text to the location that I want, but the object does not have any SetText methods. I've used Record (script) to hit all of these objects, if there's another (better) way please share. Here's what I've got now: Sub Test1 Dim browser, loc Set browser = Aliases.browser 'Click the arrow next to Save to display the drop down Call browser.BrowserWindow.FrameNotificationBar.Notification.Save.Item.Click(6, 12) 'Click Save As Call browser.wnd32768.Click(69, 33) 'Get our location field object Set loc = Aliases.browser.dlgSaveAs.WorkerW.ReBarWindow32.AddressBandRoot.msctls_progress32.BreadcrumbParent.location_bar 'No way to set it's text. loc.SetText? End Sub2.5KViews0likes3Comments