Control matched and attached but not working contorl functionality.
I am working on Automation on Windows application. While interrogate the target application, able to match and attach the control to object explorer. When I call PerformClick method of the control and it is not working. Even I verified it in Test Control methods and it is not working. Second time when I interrogate it and control is not matched,again creates new control. Please advise on this.
***Updated by moderator: Lochan to update Categories***
For the control, you will need to review the match rules. Check what properties are changing after each run and use that information to try different match rules.
Based on the picture, it looks like you are trying to click a label that might turn into a textbox after being clicked, am I correct? For the PerformClick, it could be that the control does not support the PerformClick method. There may be code in the application that requires more than a PerformClick for it to "activate" the control. If that is the case, the Pega Robotics Support Team will need to review and accommodate for this special case.
Before you do that, I suggest exhausting all your options... you can try focusing on the control first or maybe try raising events first before perform clicking. You can also try SendKeys.
Thanks for your reply Vegam.. Yes you are correct. It is label control and can you please advice , in this case, what type o events which I needs to raise before perform clicking? Also how do I use sendKeys?
SendKeys is not the preferred solution and should be your last resort. It seems to me that you are not matching the control properly and that if you were to match, then it would work without using SendKeys. At any rate, the SendKeys would fail in the same manner if you were not properly matching the control. Remember that you need to properly match all controls in the hierarchy and not just the specific control (all its parents/grandparents, great grandparents, etc... must be uniquely matched).