In all such problems, as well as in other cases, the surface tension is parallel to the liquid surface. As an example I am giving you the first solved numerical of ABC Physics (previous NCERT course).
A U-shaped wire is dipped in soap solution and removed. The thin soap film formed between the wire and the light slider supports a weight of 1.5X10-2N (which includes the small weight of the slider). The lenght of the slider is 30 cm. What is the surface tension of the film?
Now, in this problem, a U-shaped frame is taken and a slider is fitted in it as shown in the figure
The slider can slide to and fro in the direction of the arrows.
Now the film formed on this frame comprises of:
1) Two liquid surfaces
2)The bulk of liquid inside.
The edges of the two liquid surfaces touching the upper and lower edge of the slider exerts surface tensional force F = 2SL on the slider (not towards the bulk of the liquid but parallel to the surface itself) and thus pull the slider (towards left in the present figure). Similarly, when the frame is vertical, with the open end downward, then the surface tensional force is upward. This upward force is balanced by a known weight acting downwards. From that we find the surface tension.
If you have any doubt on the working of this frame, read Concepts of Physics (HCV) thoroughly.