[ruby_lib] Question on "mobile: scroll" command

Hello,

Executing this command execute_script "mobile: scroll", :direction => 'down' it will try to scroll down in the first element of type scroll view, table or collection view it finds.

Is there is any way to specify in which View to do the scroll down?

Thanks.

have you tried :element ?

As in:

ele = find 'element' #get element you want
execute_script "mobile: scroll", :direction => 'down', :element => ele

or

execute_script "mobile: scrollTo", :element => ele

I didn’t try it now but should be something similar.

This might need to use .ref:

execute_script "mobile: scrollTo", :element => ele.ref

1 Like

Thanks @Telmo_Cardoso