Refactored getSelectedItem to use Mink