I just used ElementFindChildValue successfully with MouseClick to select the item. However, this only works if that element is onscreen. If you must scroll down then it will not click on it yet ElementFindChildValue does indeed find the element.
I could not get ElementSelect to work correctly.
Code: Select all
child_element = Ranorex.ElementFindChildValue(parent_element,
select_text,
Ranorex.MATCH_SUBSTRING)
if not child_element:
return 1
#ret = Ranorex.ElementSelect(child_element,
#Ranorex.STATE_SYSTEM_FOCUSABLE | \
#Ranorex.STATE_SYSTEM_SELECTABLE)
#if not ret:
#return 1
ret2 = Ranorex.MouseClickElement(child_element,
Ranorex.MOUSE_LEFT_BUTTON)
if ret2:
return 1