SAP Treeview not working

Malligai

Member
Hi Team,

Am working on the SAP process. While extracting the "tree view" , am not able to spy the element. but in code stage its working fine, but when the expand node number is changed in prod, its not working.

can anyone help me on this, how to click on the particular element which we always want.

From the below image.. I have to expand the button of "Control Expand" and i have to click on the "XXX Click".

From the SAP tree view its able to click on the "control Expand", but after this am not able to click on the "XXX". it may get vary with the position.

Requirement : I have to click on the "XXX Click" with the text value whereever is was placed.

The below code its not working, if the position is changed.

SAPSession.findById("wnd[0]/shellcont/shell/shellcont[0]/shell/shellcont[1]/shell[1]").expandNode(" 1")
SAPSession.findById("wnd[0]/shellcont/shell/shellcont[0]/shell/shellcont[1]/shell[1]").clickLink(" 3","&Hierarchy")

Can anyone help me on this to change the code dynamicaaly or with the spying mode
 

Attachments

  • paforum.JPG
    paforum.JPG
    47.6 KB · Views: 25

sahil_raina_91

Active Member
Hi Team,

Am working on the SAP process. While extracting the "tree view" , am not able to spy the element. but in code stage its working fine, but when the expand node number is changed in prod, its not working.

can anyone help me on this, how to click on the particular element which we always want.

From the below image.. I have to expand the button of "Control Expand" and i have to click on the "XXX Click".

From the SAP tree view its able to click on the "control Expand", but after this am not able to click on the "XXX". it may get vary with the position.

Requirement : I have to click on the "XXX Click" with the text value whereever is was placed.

The below code its not working, if the position is changed.

SAPSession.findById("wnd[0]/shellcont/shell/shellcont[0]/shell/shellcont[1]/shell[1]").expandNode(" 1")
SAPSession.findById("wnd[0]/shellcont/shell/shellcont[0]/shell/shellcont[1]/shell[1]").clickLink(" 3","&Hierarchy")

Can anyone help me on this to change the code dynamicaaly or with the spying mode

Familiarize yourself with SAP GuiTree Object here : https://help.sap.com/viewer/b47d018...4/en-US/8f08be87b0194d9882d0382eae798617.html
You will have to create custom code to traverse child nodes to find out relevant node text/item text and accordingly click on it
 
Top