Question

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***

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Correct Answer
June 27, 2017 - 12:38pm

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. 

Comments

Keep up to date on this post and subscribe to comments

Pega
June 27, 2017 - 12:38pm

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. 

June 30, 2017 - 10:56am
Response to Mitchell

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?

Pega
June 30, 2017 - 12:25pm
Response to RanjithkumarT

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).

Pega
June 28, 2017 - 6:31am

Check the match rules on the controls above your control.  Make sure they are loose enough to allow a match on all instances (check text match rules and element id rules in particular).

What application are you automating?  Is it Siebel?

June 30, 2017 - 10:58am
Response to jeffbadger

thanks jeff. I will check the match rules.. it is an windows application which is build in .Net technologyy

June 30, 2017 - 11:20am
Response to RanjithkumarT

also can you please provide help doc link for match rules. I wants to learn what are ways to use match rules.

Pega
June 30, 2017 - 12:22pm
Response to RanjithkumarT

Use http://help.openspan.com/

There is a section devoted to the match rules.