Click on SAP Label

I have a requirement to click on the SAP Label or position my cursor on the first row.

I am not able to perform Press/Click option on the Label nor dont know how to postion my cursor.

Image attached. please help.
 

Attachments

  • positionCursor.JPG
    22.1 KB · Views: 128

VJR

Well-Known Member
Hi PriyaArvind,

Do the below only if you are not seeing any Focus action in the Navigate stage for that Label. If you are seeing a Focus option then you can directly use it.

Take the necessary backups before proceeding so that your existing Application Modeller doesn't screw up although there is nothing fancy done here, but to be on the safe side.

At first Spy any one of the Textboxes in the SAP application. On doing so you will get two attributes (or maybe more) in the Application Modeller. Make a note of the Object Id of the textbox element.

Now spy the Label. Make a note of its Object Id too.
Now replace the Object Id of the Label with the Text box Object Id. Meaning - Copy the Object Id of the Textbox and paste into the Label one.
Apply the changes and go to the Navigate stage where you should be able to see a Focus action in the dropdown in the Navigate stage.
 

VJR

Well-Known Member
Hi PriyaArvind, it worked for me and also for someone whom I've suggested the same.
Are you able to share the screenshots of all the changes you've made - how it was, how the object id of the textbox is and how it is modified to the label?
 
Hi VJ, i have now got it work by using surface automation.

if you think it will be useful if i get the screenshots of the error message and the code for altering the object id text box to label. Then i can revert back the changes and get back to you.
Thanks
 

VJR

Well-Known Member
Hi PriyaArvind,

Don't revert back the changes as it will be time consuming for you particularly if it is working fine. But just to let you know Surface Automation or Region Mode should be used as a last resort when none of the spying modes work at all. If you use Region Mode for that label and if the SAP window is opened/moved even little bit to the right, left, top or bottom it won't capture the label region correctly.
But if all is going well for you with it then better don't disturb it and continue to do what you are doing.
 

Shweta

Active Member
Hi, can someone please also help me as, Iam also facing the similar issue. I have spied an sap element where the element type is label. I need to click on it which I am unable to do. I have also tried changing the object ID as suggested in the above post and when I am highlighting it, it says element not found.

also that Sap label element object id contains below at the end .. which is slight different from textbox object IDs.

lbl[1,7]
 

Shweta

Active Member
And I believe that object ID is unique for all elements, so if I am using the object ID of textbox for a label type Element, won't the bot be looking for that textbox element.?
 
Top