I have the following widget...
class MdRadioButton < PageObject::Elements::RadioButton
extend PageObject::Accessors
label :title, :class => "control-label"
def select
self.click
end
def selected?
self.class_name.include? "md-checked"
end
end
PageObject.register_widget :md_radio_button , MdRadioButton, :element
Then I try to access the title like this...
md_radio_buttons(:rdio, :class => "my-radio")
...
rdio_elements.each do |option|
if option.title == alert_group
option.select
end
end
But when I option.title
I get...
undefined method `platform' for #<Watir::HTMLElement:0x162e57d8\>
option.select
works fine
Update
I tried this...
class MdRadioButton < PageObject::Elements::RadioButton
extend PageObject::Accessors
include PageObject
Now the .title
works but .select
does not.
wrong number of arguments (0 for 1)