Forum Discussion
No that doesn't work. I think it is pressing Alt and O separately because I can see the toolbar in IE.
Then next I would try
Sys.Desktop.Keys("[Hold}~[O]");
- shiva_ranabhat10 years agoContributor
:mansad:
I have tried every single combination there.Then went frustrated and post it in the community.
It is pressing Alt as you can see underline under Open.
Thanks anyway!
- finae10 years agoContributor
try:
llplayer.keydown win32api.vk_lmenu,100
sys.desktop.keys "o"
llplayer.keyup win32api.vk_lmenu,100
- Kamal_chennai10 years agoContributor
Hi Shiva,
Please try this => Sys.Desktop.Keys("[Hold]~o");
Instead of
Sys.Desktop.Keys("[Hold]~[O]"); Here you are using o with in Braces[]. The string only comes with in double quotes. I am not sure but please try above solution. If it work then it will fine
Thanks,
Kamal
- AlexKaras10 years agoChampion Level 3
Hi,
The following code worked for me (to Save|Save As):
'------------------------------------------------------------------------- Function SystemDialogFileSaveHandle(ByVal strFileFullName) Const cProcName = "SystemDialogFileSaveHandle" Dim cProcNameMsgPrefix : cProcNameMsgPrefix = cUnitNameMsgPrefix & cProcName & "(): " Dim browser Dim UploadFileWindow Dim button, button2 Dim tmpControl Dim FileName, FullFileName SystemDialogFileSaveHandle = Empty ' handle notification bar window ' For cross-browser specifics: ' http://support.smartbear.com/articles/testcomplete/cross-browser-testing/ ' http://smartbear.com/forums/f75/t76579/click-on-short-time-pop-window-(e-g-ie9-noti/ ' http://smartbear.com/forums/f75/t60772/ie-8-file-download-box-save-button-not-gettin/ ' http://smartbear.com/forums/f75/t60730/ie-8-save-button-is-visible-on-screen-but-vi/ Set browser = Aliases.browser Select Case browser.ObjectIdentifier Case "iexplore" Select Case browser.FileVersionInfo.MajorPart Case 7 Case 8 Case Else Set UploadFileWindow = BrowserWindowByPageGet(GetPage()).FindChild("ObjectIdentifier", "Notification*", 30) ' Aliases.browser.BrowserWindow(0).Window("Frame Notification Bar", "", 1).ToolBar("Notification").Text("Notification bar Text").Value Set button = UploadFileWindow.FindChild( _ Array("ObjectType", "ObjectIdentifier"), Array("SplitButton", "Save"), 30) Set button2 = button.FindChild("ObjectType", "DropDownButton", 30) button2.Click browser.Popup("Context").MenuItem("Save as").Click End Select Case "firefox" Set UploadFileWindow = browser.WaitAliasChild("MozillaDialog", 30000) Set button = UploadFileWindow.FindChild( _ Array("ObjectType", "ObjectIdentifier"), Array("radio", "save"), 30) button.Click Set button = UploadFileWindow.FindChild( _ Array("ObjectType", "ObjectIdentifier"), Array("button", "OK"), 30) Call button.WaitProperty("Enabled", True, Project.Variables.pvtPageTimeout) button.Click Case "chrome" Set UploadFileWindow = browser.FindChild("WndClass", "#32770", 30) End Select ' browser.ObjectIdentifier FullFileName = ... Call SystemDialogFileSave(FullFileName) SystemDialogFileSaveHandle = FullFileName End Function '------------------------------------------------------------------------- ' Returns BrowserWindow object that corresponds to the given page object ' From: http://smartbear.com/forums/f75/t83264/how-to-match-a-page-object-to-its-browserwindow Function BrowserWindowByPageGet(ByRef page) Const cProcName = "BrowserWindowByPageGet" Dim cProcNameMsgPrefix : cProcNameMsgPrefix = cUnitNameMsgPrefix & cProcName & "(): " Dim title Dim wnd Set wnd = Utils.CreateStubObject If (Not IsNull(page)) Then If (0 = aqString.Compare(page.ObjectType, "Page", False)) Then title = page.contentDocument.title Set wnd = page.Parent.FindChild("WndCaption", title & "*") If (Not wnd.Exists) Then Set wnd = page.Parent.FindChild("WndCaption", Project.Variables.pvtBaseURL) End If End If End If Set BrowserWindowByPageGet = wnd End Function '-------------------------------------------------------------------------
Related Content
- 5 years ago
- 4 years ago
- 5 years ago
Recent Discussions
- 4 days ago
- 4 days ago
- 8 days ago