Loading ...
Sorry, an error occurred while loading the content.

Re: Cannot get GetTreeViewSelPath or SelTreeViewItemPath to work

Expand Messages
  • hp189bp
    Looks like this may be a .net issue. The application I am running against is a .net snap in to the mmc and it doesn t seem to work. However, I have tried a
    Message 1 of 2 , Mar 4 9:47 AM
    • 0 Attachment
      Looks like this may be a .net issue.

      The application I am running against is a .net snap in to the mmc and
      it doesn't seem to work.

      However, I have tried a similar thing with the perfom mmc snap in and
      the win32guitest treeview functions work fine.

      I'm surprised this makes a difference because the mmc is written in
      unmanaged code. Can't imagine why a .net snap in would change the
      behaviour of the left hand treeview.

      Nick.


      --- In perlguitest@yahoogroups.com, "hp189bp" <nick.williams@e...>
      wrote:
      >
      >
      > Hi,
      >
      > My first post to this group, I am a beginner as far as guitest goes
      > but am hopeful that it can really help with some automated testing
      I
      > have planned.
      >
      > Problem is:
      >
      > I have a c++ application which contains a tree ( SysTreeView32). I
      am
      > attempting to write a test script which will select a new node from
      > the tree view. Below is the code so far:
      >
      > ## Main/Core
      > # HINT: Foreground Window: Text = 'C:\win32uitest\Win32-GuiTest-
      > 1.50.3-ad\Recorder', Class = 'CabinetWClass', Id = 393841
      >
      > my @whnds = FindWindowLike( undef, "MetaFrame Presentation Server
      > Administration" , "MMCMainFrame");
      >
      > if( !@whnds ){
      > die "Cannot find window with title/caption Calculator\n";
      > }else{
      > printf( "Window handle of MPS application is %x\n", $whnds[ 0 ] );
      > }
      >
      > my @thnds = FindWindowLike( $whnds[ 0 ], undef , "SysTreeView32");
      > if( !@thnds ){
      > die "Cannot find window with title/caption Calculator\n";
      > }else{
      > printf( "Window handle of MPS tree is %x\n", $thnds[ 0 ] );
      > }
      >
      > my $path = GetTreeViewSelPath($thnds[0]);
      > printf("current selected item is %s\n", $path);
      >
      > SelTreeViewItemPath($thnds[0], "MetaFrame Presentation Server
      > Administration|Report Center");
      >
      > It gets as far as reporting the two window handles correctly (
      > checked in winSpy++) which means it has found the treeview.
      > But, nothing is returned from the call to
      > GetTreeViewSelPath and the new node is not selected by the call to
      > SelTreeViewItemPath.
      >
      > Any ideas?
    Your message has been successfully submitted and would be delivered to recipients shortly.