Forum Discussion
If you are looking for an element by ControlText, then you may need to use property "Parent".
Try it like this:
var text_object = Your_AliasObject.FindChild("ControlText","1001NA21000011",10);
var list_item = text_object.Parent;
- sonya_m4 years agoSmartBear Alumni (Retired)
- David914 years agoFrequent Contributor
I try it thank you
- David913 years agoFrequent Contributor
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 🙂
- AlexKaras3 years agoChampion Level 3
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
Related Content
- 3 years ago
- 4 years ago
- 7 years ago
- 2 years ago
Recent Discussions
- 2 days ago