http://www.perlmonks.org?node_id=991555


in reply to Re^3: Problem using Win32::GuiTest::Treeview for Windows 64 bit application
in thread Problem in getting text of the tree node using Win32::GuiTest::Treeview for Windows 64 bit application

Hi, I have been already posted the problem I was facing using win32::guitest::treeview module. Please go through the first thread of this problem title. I think you would get to know what actually the problem is. I have also mentioned the demo script for this issue.

But anyways the problem is that I am not able to fetch the text of the tree nodes which I am traversing using Win32::GuiTest::Treeview module for windows 64 bit application. In TreeView.pm there is a function named GetItemText() return blank for the selected tree node. Please see the demo script

use warnings; use Win32::GuiTest qw(:ALL); use Win32::GuiTest::TreeView; use Data::Dumper; use Win32; # Get the handle of window object my @SEHandle = FindWindowLike(undef,$Title,'SysTreeView32','32783',und +ef); if (!$SEHandle[0]) { return 0; } sleep 2; # Find the number of child handles and store in an array my @ChildTree = Win32::GuiTest::TreeView::GetChildList_H($SEHandle[0]) +; Win32::MsgBox("@ChildTree"); foreach my $Child (@ChildTree) { my $Text = Win32::GuiTest::TreeView::GetItemText($SEHandle[0],$Chi +ld); Win32::MsgBox("Text = $Text"); }

My windows 64 bit application contains lots of "systreeview32" and "syslistview32" classes. For testing UI of my application mostly I am using Win32::GuiTest and Win32::GuiTest::Treeview modules.

My findings are: 1. GetListContents, GetListViewContents APIs (Win32::GuiTest) 2. GetItemText API (Win32::GuiTest::Treeview) 3. GetPopupHandle API (Win32::GuiTest)

These API's are not working properly for Windows 64 bit application but working fine for 32 bit application. And I think this might be cause because of memory allocation is different for 64 bit and 32 bit application and also there are some windows params are like TVM_GETNEXTITEM, TVIF_TEXT etc might be the main culprit.

Thanks. Waiting for ur reply!!

  • Comment on Re^4: Problem using Win32::GuiTest::Treeview for Windows 64 bit application
  • Download Code

Replies are listed 'Best First'.
Re^5: Problem using Win32::GuiTest::Treeview for Windows 64 bit application
by BrowserUk (Patriarch) on Sep 04, 2012 at 07:14 UTC
    These API's are not working properly for Windows 64 bit application but working fine for 32 bit application.

    Then you have found a bug in the module. You'll need to raise the issue with the maintainer.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    RIP Neil Armstrong

    A reply falls below the community's threshold of quality. You may see it by logging in.