cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic attributes

Anonymous
Not applicable
Hi, The problem related to logging process in the SAP system. I have created new regions to capture the user name input box and password input box. The issue is that the window of the logging process can be in a different size, I mean the window can be maximised once and the window can be resized next time. How should I set coordinates in Application Modeler? I could make the Start X and End X coordinates dynamic, but I have got the following message: Missing parameter for dynamic identifier 'StartX' in Navigate Stage 'Select User' on page 'SAP Logon 1'. Hope that you can help. P.
10 REPLIES 10

John__Carter
Staff
Staff
Hi PK - when you make an attribute dynamic, you are saying 'I want to include this attribute in my element but I don't want its value to be fixed in Application Modeller, instead I will supply the value from the diagram'. In your Navigate properties you will see that in the Params column the button that was previously disabled is now enabled. When you press it you will see where to supply your dynamic value. This value has to be supplied at every point where you use the element.

TomBlackburn1
Level 7
P.K, Dynamic attributes require you to supply the match criteria within a stage. You should look through some of the examples in the Surface Automation training. They show you how to get the screen bounds, create a region with a dynamic start and end, x and y attribute to capture the screen image using these bounds, then use the image search utility to find a pre-captured username and password image to find the X and Y co-ordinate of location. You can then use these coordinates for your mouse clicks. Tom

Anonymous
Not applicable
Hi Tom, Thank you for your reply! It is becoming more and more clear. So what should I set in Parms tab? What values for Start X and End X coordinates? Values from Application Modeller, like 168 (Start X) and 258 (End X)? Is that correct? Paulina

TomBlackburn1
Level 7
Use a read stage -> With the read stage use the screen element from the application modeller as your element and set the data dropdown to Get Bounds, and ouput result to a collection. I usually call my collection SB. Then use another read stage -> Use the element with dynamic x+y attributes as your element, set the data drop down to read image and output to an image data item. I usually call this screen image. Then you would use the below matrix in your params tab : Start X = [SB.Left] Start Y = [SB.Top] End X = [SB.Right] End Y = [SB.Bottom] This has now read your whole screen as an image data item. - Tom

Anonymous
Not applicable
Thank you for your help! I've used read stages, as you wrote. I've deleted also navigate stages, that I've created before. Unfortunatelly I've got the following error: 'Internal : Stage does not exist.' The process stopped on the second read stage. What can be the problem? Is it connected to lack of image? I've captured regions on the screen.... Paulina

TomBlackburn1
Level 7
You are going to need to do some debugging. 1) Run the first read stage. This should populate the SB collection. Open the collection and check that it has some values in current values tab 2) Open up the second read stage, click on the ... button in the params column, open up the full expression editor on each of the parameters and click evaluate expression. Check it returns these values from the collection 3) Check you have chosen the data drop down - read image and it outputs to an image data item

Anonymous
Not applicable
Tom, 1. I have values in current values tab: Left=0, Top=0, Bottom=860, Right=800, Width=800,Height=860. 2. Correct. 3. Correct. What step should be next, because I have Navigate stage (select user) and I've got the following error: 'Internal : Field 'Button' is not defined in the collection'. What does it mean?

Anonymous
Not applicable
Hi Tom, I've done exercises connected with image recognition from Introduction to Surface Automation training and my process doesn't work. Mouse cursor isn't on the right position when the screen of the program is maximised. Do you know what can be the reason? Does it related to performance? I've checked my settings and everything seems to be corresponding to the exercises. You can find my settings in attachment. Hope that you can help. Paulina

Anonymous
Not applicable
Hi, I've created dynamic region and two read stages in my diagram and I've checked the following settings: 1) I've run the first read stage. This populates the SB collection. The collection has some values in current values tab. That is Ok. 2) I've opened up the second read stage. In the params column I've checked the full expression editor and each of the parameters return these values from the collection. 3) I've chosen the data drop down - read image and it outputs to an image data item. Unfortunately at the second read stage I've got the following error: Unable to match any windows with the query terms.