@@ -126,19 +126,19 @@ module Support
126126 first_option = instance_double ( Element , selected? : true )
127127 second_option = instance_double ( Element , selected? : false )
128128
129- allow ( first_option ) . to receive ( :dom_attribute ) . with ( :index ) . and_return '0'
129+ allow ( first_option ) . to receive ( :property ) . with ( :index ) . and_return 0
130130 expect ( first_option ) . not_to receive ( :click )
131131
132- allow ( second_option ) . to receive ( :dom_attribute ) . with ( :index ) . and_return '1'
132+ allow ( second_option ) . to receive ( :property ) . with ( :index ) . and_return 1
133133 expect ( second_option ) . to receive ( :click ) . once
134134
135135 allow ( multi_select ) . to receive ( :find_elements )
136136 . with ( tag_name : 'option' )
137137 . and_return ( [ first_option , second_option ] )
138138
139139 Select . new ( multi_select ) . select_by ( :index , 1 )
140- expect ( first_option ) . to have_received ( :dom_attribute ) . with ( :index )
141- expect ( second_option ) . to have_received ( :dom_attribute ) . with ( :index )
140+ expect ( first_option ) . to have_received ( :property ) . with ( :index )
141+ expect ( second_option ) . to have_received ( :property ) . with ( :index )
142142 expect ( multi_select ) . to have_received ( :find_elements ) . with ( tag_name : 'option' )
143143 end
144144
@@ -198,8 +198,8 @@ module Support
198198 . with ( tag_name : 'option' )
199199 . and_return ( [ first_option , second_option ] )
200200
201- allow ( first_option ) . to receive ( :dom_attribute ) . with ( :index ) . and_return ( '2' )
202- allow ( second_option ) . to receive ( :dom_attribute ) . with ( :index ) . and_return ( '1' )
201+ allow ( first_option ) . to receive ( :property ) . with ( :index ) . and_return ( 2 )
202+ allow ( second_option ) . to receive ( :property ) . with ( :index ) . and_return ( 1 )
203203
204204 expect ( first_option ) . to receive ( :click ) . once
205205 expect ( second_option ) . not_to receive ( :click )
0 commit comments