Done that quite a few times in the past.
Bought tickets at the train station.
If unlucky you might experience a delay at the border due to people traveling with fruits, invalid visa, drugs or insufficient funds. Usually the bus driver waited a while to not leave anyone behind, but usually these people never made it.
Also, taking the train is a nicer way to travel.