Added new method selectRandomOption. Added type hint to getElements