Having problems with your account or logging in?
A lot of changes are happening in the community right now. Some may affect you. READ MORE HERE
HGrube Absent Member.
Absent Member.
1604 views

Why does Expand and Collapse not work in each SWTTree?

Jump to solution

[Migrated content. Thread originally posted on 18 May 2012]

Hello support,

Why does Expand and Collapse not work in each SWTTree?
To replay you can use the Eclipse IDE.
In the "Package Explorer" two nodes are available as root: test and test2
The expand and collapse actions are well recorded by SilkTest but replaying the script shows no effect for the expanding and collapsing commands.
Imports SilkTest.Ntf.Swt
Public Module Main
    Dim _desktop As Desktop = Agent.Desktop

    Public Sub Main()
        With _desktop.Shell("Java - Eclipse SDK")
            .SetActive()
            .SWTTree("Tree").Select("/test")
            .SWTTree("Tree").Expand("/test")
            .SWTTree("Tree").Select("/test2")
            .SWTTree("Tree").Expand("/test2")
            .SWTTree("Tree").Select("/test")
            .SWTTree("Tree").Collapse("/test")
            .SWTTree("Tree").Select("/test2")
            .SWTTree("Tree").Collapse("/test2")
        End With
        
    End Sub
End Module


It might be a bug?

Regards
Holger
0 Likes
1 Solution

Accepted Solutions
Highlighted
HGrube Absent Member.
Absent Member.

RE: Why does Expand and Collapse not work in each SWTTree?

Jump to solution
Hello Michael,

your collegue Mark found the solution for my problem:

I am only able to reproduce the behaviour you are seeing when the playback mode is set to "Low Level". Can you:
- open Tools | Options
- expand Playback.
- Select General.
- Set "Playback Mode" to "default".


It influences also the Expand/Collapse actions.

With the "default" option everything works allright.

Thanks.
Holger
0 Likes
3 Replies
ThomasF Absent Member.
Absent Member.

RE: Why does Expand and Collapse not work in each SWTTree?

Jump to solution
Hi,
I see that you already have posted a message about your problem some time ago. If you have still problems also with the provided solutions you should log a support case via SupportLine. We need more information about your environment and this can be handled easier via support line.

thanks,

thomas
0 Likes
MichaelBr Absent Member.
Absent Member.

RE: Why does Expand and Collapse not work in each SWTTree?

Jump to solution
Hi Holger,

I am unable to reproduce this behaviour on my system. I ran the code below and it expanded and collapsed nodes with no issues at all.

Imports SilkTest.Ntf.Swt
Public Module Main
    Dim _desktop As Desktop = Agent.Desktop
    Public Sub Main()
        With _desktop.Shell("@caption='Java - Eclipse'")
            .SetActive()
            .SWTTree().Expand("/Browser Test")
            .SWTTree().Expand("/JavaSwing")
            .SWTTree().Collapse("/Browser Test")
            .SWTTree().Collapse("/JavaSwing")
        End With
    End Sub
End Module


I have attached a video showing this playing back correctly. Note that I added some sleep statements to make it easier to view the actions working.

If you are able to provide a reproducible example then as Thomas said you should open an official support incident so that they issue can be properly investigated and tracked in our systems.

Thanks
Michael
0 Likes
Highlighted
HGrube Absent Member.
Absent Member.

RE: Why does Expand and Collapse not work in each SWTTree?

Jump to solution
Hello Michael,

your collegue Mark found the solution for my problem:

I am only able to reproduce the behaviour you are seeing when the playback mode is set to "Low Level". Can you:
- open Tools | Options
- expand Playback.
- Select General.
- Set "Playback Mode" to "default".


It influences also the Expand/Collapse actions.

With the "default" option everything works allright.

Thanks.
Holger
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.