If the batsman tries to hit a six and it goes to the hands of a fielder, the fielder steps on the boundary line before catching the ball and then comes back to catch the ball and catches it cleanly, will it be given as a wicket or not?
Reading Law 19.5 suggests that this would be out, if the fielder is properly in bounds when catching the ball. Your scenario does not cover any of these scenarios:
19.5 Fielder grounded beyond the boundary
19.5.1 A fielder is grounded beyond the boundary if some part of his/her person is in contact with any of the following:
the boundary or any part of an object used to mark the boundary;
the ground beyond the boundary;
any object that is in contact with the ground beyond the boundary;
another fielder who is grounded beyond the boundary, if the umpire considers that it was the intention of either fielder that the contact should assist in the fielding of the ball.
19.5.2 A fielder who is not in contact with the ground is considered to be grounded beyond the boundary if his/her final contact with the ground, before his/her first contact with the ball after it has been delivered by the bowler, was not entirely within the boundary.