I'm unable to access the listItem Purchase Order Processing , which is within a list (List2 in below image) When I check the RXPath for this control using Spy, it's shown as
Code: Select all
"/form[@wpfnative='True' and @title='Hubble [DEMO900]' and @processname='Hubble']/?/?/element[@automationid='BackStageContent']/list[@automationid='backstage']/element[@automationid='backstageTabNew']/container[@automationid='newInquiryControlBackstage']//list[@automationid='ModulesMenu']/container/container[2]/list"
What's wierd is that the I can access the items within list1 using an RxPath which I had noted using an older version of ranorex and looks very different
Code: Select all
/form[@name='Hubble [DEMO900]']/?/?/element[@automationid='newInquiryControlBackstage']/container[1]/list[1]/listitem[@name='General Ledger'']
I even tried getting the items from the list through code but still hasn't helped
Code: Select all
IList<Ranorex.List> purchaseOrderModuleSelection = form.Find<Ranorex.List>("/form[@wpfnative='True' and @title='Hubble [DEMO900]' and @processname='Hubble']/?/?/element[@automationid='BackStageContent']/list[@automationid='backstage']/element[@automationid='backstageTabNew']/container[@automationid='newInquiryControlBackstage']//list[@automationid='ModulesMenu']/container/container[2]/list");
foreach (Ranorex.List item in purchaseOrderModuleSelection)
{
IList<Ranorex.ListItem> itemNames = item.Items;
foreach (Ranorex.ListItem lstItem in itemNames)
{
string s = lstItem.Text;
}
}
Could someone help me understand how I can get access to the items with the second List?
Thanks,
Sherin