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


in reply to Re: 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 uploaded the TreeView.pm on my scratchpad. Please go through the module and let me know the solution as soon as possible. I am waiting for ur reply... Thanks.

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

Replies are listed 'Best First'.
Re^3: Problem using Win32::GuiTest::Treeview for Windows 64 bit application
by BrowserUk (Patriarch) on Sep 03, 2012 at 12:57 UTC
    Please go through the module and let me know the solution as soon as possible.

    The solution to what?

    Have you identified a particular problem, or do you expect me to go through all 907 lines and find it for you as well?

    I am waiting for ur reply...

    Ur gna B w8ing a tiiiiiiiiiiiiiiiiiiiiiiiiiime.

    Life line

    If I understand the implications of your posts, you are saying that when you call a particular Win32::GuiTest function, with particular arguments, on 64-bit Windows, you aren't getting the result you expect.

    If that is the case, don't throw 1000 lines of code at me -- that I can't run without building an application, and won't demonstrate the problem unless I accidentally hit the exact scenario in which you are seeing failures. Can you not see that you will never get help that way?

    Think! Start from the point of known failure. Construct a script that recreates that failure:

    • simple: forget OO, forget tests, forget comment blocks, forget your uni/company/personal coding standards.

      You are not creating a work of art, nor a thesis project, nor a legacy for your children, nor an advertisement for your programming skills.

      Your responsibility is to demonstrate the problem as simply as possible.

    • short: 20 lines would be good. 100 lines is okay if they are all actually required.

      1000 lines is just taking the piss.

      Without getting silly and golfing, the fewer lines the better.

    • standalone: no modules or dependencies.

      Not even your personal favorite test::more::morestill::best::bestist::bestistButBetter::* test suite. I probably don't have; certainly don't want it; wouldn't trust it anyway, and won't install it.

      The easier it is for people to run your sample code, the more likely some of them are to try it.

      Throwing a 1000 line module, with no script that exercises it and no clear indication of the problem you've encountered, doesn't enable that.

    Make it easy for those you asking for (free) help. Normally, I would simply be ignoring your post, but you've obviously taken a lot of time and put in a lot of work.

    You've just expended it in the wrong place to enable anyone here to help you.


    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

    pmsig

      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!!

        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.