No, Kicksome has it exactly right. /castrandom DOES NOT CARE ABOUT COOLDOWNS. If you have the following:

/castrandom Lava Burst, Flame Shock

When you press it once you have a 50% chance of casting either. When you press it again, YOU HAVE THE SAME 50% CHANCE. It doesn't care that Lava Burst was just cast and is on cooldown, if its random roll determines Lava Burst should be cast again it'll try and the engine will return the error Spell Not Ready (or whatever). A comma just means "do nothing", its a way to "drop down" to the next line:

/castrandom Flame Shock, Lava Burst,
/cast Lightning Bolt

for example will cast FS or LV or nothing (33% chance of any), if nothing casts it will cast LB. If either Flame Shock or Lava Burst cast, then Lightning Bolt will not be cast. If both FS and LV are on cooldown it'll try, fail, and then drop down to cast Lightning Bolt.

The problem with any of these macros is that you really, really, really want Flame Shock to be cast before Lava Burst -- otherwise 50% of the time Lava Burst will be cast first, and you will not get the crit guarantee. I use this currently as my PVE spam macro (I have seperate buttons for everything for PVP, or complex boss fights):

#showtooltip Lava Burst
/use 13
/use 14
/cast Elemental Mastery
/castsequence [target=focustarget,harm][] reset=target/combat/8 Flame Shock,Lava Burst,Lightning Bolt,Lightning Bolt,Lightning Bolt

As you get more haste you may need more LBs, keep an eye on the c/d for FS and LV on your bars and you can add more -- I actually could do with just 2 LBs, but I prefer the 3d one since FS staying a few seconds extra is nice for mana. I do chain lightning seperately since its a high mana spell and not needed for most bosses.

The nice thing about the macro above is that I can just spam that key as much as I want and it works fine, since /castsequence will wait patiently for the spell to complete before moving to the next one.