Jump to content

Cod

Members
  • Posts

    7
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Cod's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. I am using autoIt to automate some test cases. I need to right-click which opens a context menu and then select the 6th item in the context menu. I tried to use Send("{}"), but it doesn't choose the 6th item and chooses randomly. AutoIt Window Info shows only [CLASS:#32768] about the context menu. I found another solution in a forum - Local $putMsgHandle = WinGetHandle ( "[CLASS:#32768]" ) Local $putMsgMenu = _SendMessage ( $putMsgHandle , $MN_GETHMENU , 0 , 0 ) Local $putMsgRect = _GUICtrlMenu_GetItemRect ($putMsgHandle, $putMsgMenu, 6) ControlClick("[CLASS:#32768]", "", "", "left", 1, $putMsgRect[0], $putMsgRect[1]) This code works but sometimes it chooses the wrong option. While executing, there was no mouse movement, keyboard or pop-up etc. The application to be tested was the only one open.
  2. Is it possible to search "Open in New Window" in the context menu and then click that?
  3. I am automating Eclipse IDE in a remote windows 10 system. I have used Windows Remote Desktop in Mac to connect to the windows system. In this automation, I need to search for "QueueManagers" in a SysTreeView32 and right-click it. There is another folder called "QueueManagersClusters" below QueueManagers. When I use RDP through Mac to connect to the windows system, I am able to click "QueueManagers" and right-click it. But when I use RDP through a Lenovo system to connect to the windows system, it clicks "QueueManagersClusters" instead of "QueueManagers". I have used the below code: #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <GuiTreeView.au3> WinActivate("eclipse-workspace - Trial/src/module-info.java - Eclipse IDE") Sleep(1000) Local $hWnd = ControlGetHandle("eclipse-workspace - Trial/src/module-info.java - Eclipse IDE", "", "SysTreeView321") ;MsgBox(0, "Handle", $hWnd) Sleep(1000) Local $searchText = "QueueManagers" $hItemFound = _GUICtrlTreeView_FindItem($hWnd, $searchText) ;MsgBox(0, "Result", $hItemFound) If $hItemFound Then Sleep(1000) _GUICtrlTreeView_ClickItem($hWnd, $hItemFound) _GUICtrlTreeView_ClickItem($hWnd, $hItemFound, "right") Send("{DOWN}") Send("{DOWN}") Send("{DOWN}") EndIf
  4. @ioa747 I tried Send("{HOME}") and nothing happens.
  5. I am automating Eclipse IDE in a windows 10 system. In this automation I need to search for "QueueManagers" in a SysTreeView32, select it, right-click it to open the context menu and move to "Open in new window". <br> The AutoIt inspect shows only class of the context menu and no other details. <br> So I used Send("{DOWN}") three times. <br> This works sometimes, but sometimes it doesn't start from top of context menu and chooses the wrong option.<br> I have used the below code: #Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_UseX64=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include <GuiTreeView.au3> WinActivate("eclipse-workspace - Trial/src/module-info.java - Eclipse IDE") Sleep(1000) Local $hWnd = ControlGetHandle("eclipse-workspace - Trial/src/module-info.java - Eclipse IDE", "", "SysTreeView321") ;MsgBox(0, "Handle", $hWnd) Sleep(1000) Local $searchText = "QueueManagers" $hItemFound = _GUICtrlTreeView_FindItem($hWnd, $searchText) ;MsgBox(0, "Result", $hItemFound) If $hItemFound Then     Sleep(1000)     _GUICtrlTreeView_ClickItem($hWnd, $hItemFound)     _GUICtrlTreeView_ClickItem($hWnd, $hItemFound, "right")     Send("{DOWN}")     Send("{DOWN}")     Send("{DOWN}") EndIf  I tried using Sleep(), but I got the same results. Is there a way to make Send("") start from top?<br> Is there any other way to search for "Open in new window" in the context menu and click that?
  6. @water I checked autoit forums for this specific link problem and I didn't get any solution. There were questions regarding links but they were web related, but mine is a windows application.
  7. I have pasted an image of the GUI. It is a windows application. I used ControlClick() and I was able to open the url in a browser, but I need the url. I used AutoIT's inspect tool and it shows the hyperlink as a SWT_Window0. I tried ControlGetText but I got nothing.
×
×
  • Create New...