Actually getting astride the rail in the first place (and off it again) left as an exercise for the reader.
Getting over a rail is easy as long as it's only one front wheel over.
Hard lock one way to get the angle to cross the rail with one front wheel, hard lock the other way to straighten up before the back wheel crosses the rail.
All three wheels is somewhat similar.
Hardest is only two wheels crossing a rail.
I found that out in the center of Prague, where you don't only have tram rails but they are set on cobble stones to make it more "fun".
Straddling a line is easy upto around 35 mph, I do it all the time with rumble strips or cats eyes down the sides of main roads. I can do it faster but over around 35 mph I tend not to bother and just move out into the carriageway.
It's harder if it's a rumble strip with cats eyes as the amount of room needed is too wide for the trike, so I either catch the edge of the rumble strip or the odd cats eye.
Which is ok-ish at sub-10 mph but very uncomfortable at faster speeds.