Republican Katherine Robertson has been elected to serve as Alabama’s next attorney general, replacing Steve Marshall.