Unable to select a row when the table is embeded in GUISHELL object in SAP application

Bug reports.
deabh
Posts: 1
Joined: Wed Feb 06, 2019 12:06 pm

Unable to select a row when the table is embeded in GUISHELL object in SAP application

Post by deabh » Wed Feb 06, 2019 12:17 pm

Challenges:
1. Table object is not getting identified as a single element. Entire “GUISHELL” object is getting selected while spying.
2. We can uniquely identify objects in granular level (e.g. Rows/Cells/etc.)
3. However, none of the row functions are not working.

WorkAround (Not Recommanded):
1. Click on a row using relative loction.
2. Press Shift key down
3. Click on 2nd row using same relative loction.
4. Press Shift key up

Below is the code snippet:
//Does not work - selecting a row when the table is embeded in GUISHELL object
Approach1:
repo.AUT_SAP.ContainerUsr.Row0.Element.SetAttributeValue("selected",true);
Approach2:
repo.AUT_SAP.ContainerUsr.Row0.Select();
Approach3:
IList<Row> rows = repo.AUT_SAP.ContainerUsr.GuiShell.FindDescendants<Row>();
rows[0].Select();
rows[0].Element.SetAttributeValue("selected",true);

//Does work - selecting a row when the table is embeded in GUISHELL object
repo.AUT_SAP.ContainerUsr.Row0.Click("6;11");
repo.AUT_SAP.ContainerUsr.Row0.PressKeys("{LShiftKey down}");
repo.AUT_SAP.ContainerUsr.Row1.Click("6;11");
repo.AUT_SAP.ContainerUsr.Row1.PressKeys("{LShiftKey up}");