I have a site_prism element that points to a select box. Like this:
class MyPageObject < SitePrism::Page
element :my_select_box, '#select-box-id'
end
Although I have a way to get the selected option value, with this:
my_page_object.my_select_box.value
I cannot find a nice way to get the selected option text. The only workaround that I have found is this:
my_page_object.my_select_box.find("option[selected]").text
Is there a better way to do that with SitePrism API? Because the above workaround uses a mix of SitePrism and capybara API, which does not seem to be ideal to me.