@@ -126,19 +126,19 @@ module Support
126
126
first_option = instance_double ( Element , selected? : true )
127
127
second_option = instance_double ( Element , selected? : false )
128
128
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
130
130
expect ( first_option ) . not_to receive ( :click )
131
131
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
133
133
expect ( second_option ) . to receive ( :click ) . once
134
134
135
135
allow ( multi_select ) . to receive ( :find_elements )
136
136
. with ( tag_name : 'option' )
137
137
. and_return ( [ first_option , second_option ] )
138
138
139
139
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 )
142
142
expect ( multi_select ) . to have_received ( :find_elements ) . with ( tag_name : 'option' )
143
143
end
144
144
@@ -198,8 +198,8 @@ module Support
198
198
. with ( tag_name : 'option' )
199
199
. and_return ( [ first_option , second_option ] )
200
200
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 )
203
203
204
204
expect ( first_option ) . to receive ( :click ) . once
205
205
expect ( second_option ) . not_to receive ( :click )
0 commit comments