Forum Discussion
Thank you for your advice. I select value in list. But I have another problem that when there are a lot of items in the list and the searched item is somewhere at the bottom, it does not see it and does not click on it. Is it possible to make it scroll in the list and click?
Thank you so much ๐
Hi,
Check if native .smoothScrollToOffset() method will work for you (https://support.smartbear.com/testcomplete/docs/app-objects/specific-tasks/android/list-view/selecting-items.html).
- David913 years agoFrequent Contributor
thanks but in order to use this method I need to know which position in the sheet the row is searched for. Is there any way to do this? it so that it scrolls always to the given row in the sheet according to the searched text in the position.
I need to get the position of the searched via PARENT property object.. just scroll always to the section where the object is searched
Thanks for your advice!
My code:
var list = Aliases.Device.MyApp.Layout_NO_ID.Layout_action_bar_root.Layout_content.Layout_vmc_main_content_area.ListView_vmc_screen30_list
var text_object = Aliases.Device.MyApp.Layout_NO_ID.Layout_action_bar_root.Layout_content.Layout_vmc_main_content_area.ListView("vmc_screen30_list").FindChild("ControlText", "10PR22100407", 10);
var list_item = text_object.Parent;
list_item.Click(); //click on item by FindChild ControlText parent
list.smoothScrollByOffset(list.wItemCount); // scrolls all the way down the page- David913 years agoFrequent Contributor
is there anyone who knows how to fix this? All I need to do is to find a line in the list by text and click on it. Parent works fine but doesn't scroll
Thanks
Related Content
- 3 years ago
- 4 years ago
- 7 years ago
- 2 years ago
Recent Discussions
- 2 days ago