Vous êtes sur la page 1sur 7

Object Cloning Best Practices 1

1. Guideline for Standard Technology.


a) For Windows Applications; select the following properties as Search Criteria:
Name, Class, Type, Path
b) For Web Applications, select the following properties as Search Criteria:
Name, Type, Path, HTML ID, HTML Name, HTML Tag
*Remove HTML Href from Search Criteria list. Select Value ONLY if it remains static.
*Make sure path properties remains static otherwise Uncheck the path property (the icon)
from Search Criteria list.

*Select Path, DomXPath, Path, HTML ID, HTML Name, HTML Tag, HTML Type, HTML Title property for
HTML objects as Search Criteria.

*Make sure Path properties remains static otherwise uncheck the Path property.

***********************************************

Do not use DOMXpath when identifying controls on a page if the result is index based.
Developer must write Xpath that is not index driven.

AA command to get output value from VBA:


You have to use this command in VBA script at the last line to get output value in AA
tasks.
Wscript.StdOut.WriteLine(anyvariable)
Here anyvariable is variable that you declared in your VBA file that is having your output
value.
Tip:Remember that Excel sessions, CSV/text file sessions and browser sessions (web recorder)
cannot be shared across bots. So sub-bot must be included in such a way that it does not
break these sessions.

Maintain same variable names for bot’s where you need to call next bot so that you can use
quick map option in automation[ST3].

3. If possible, check all resources that a task needs as early as possible in the main task and fail if
they are not available and handle the information (FileExists command)

4. When using object cloning, maximize screen before cloning in order to find all information

5. When setting text using object cloning, try with delay at 0 first. This will function as a SetText
function instead of a keystroke function (how object cloning works with delay)

6. When integrating with IE, make sure zoom level is 100%

7. Disable Error handling while coding (See section 8)

a) Enable before sending code to COE for TG2 review (See section 8)

8. During development, disable the code that you don’t think you need and only delete once you
are sure there is no need for the code. (There is no undo)

a) Before submitting code for COE review, remove disabled / not needed code

9. While using keystrokes, recommend a 25ms delay for each character.

a) It will take 250ms to insert all characters.


a) 1234567890

b) With 250 ms delay

c) Inserts a character every 25ms

10. With Mouse clicks in Object Cloning – always try "Click" and if it doesn't work, select "Left Click".
Left Click uses X, Y coordinates while Click uses a ButtonPress when the call is made

11. IE actions

a) Ignores any browsers opened prior to bot launch.

b) OpenBrowser will launch a new IE window (not new tab).

c) NavigateURL will find the most recent browser opened by OpenBrowser and use it.

d) If no browser was opened by OpenBrowser, then NavigateURL will launch IE.

12. MessageBox commands MUST include a timeout with appropriate error handling if no input is
given within the allotted time.

13. When reading data from files within the My Docs path, this path MUST be generated at runtime
and not hardcoded within the String Table.

14. When generating a template such as an email. Keep the template in a separate file in the My
Docs robot folder, and use the ReadFile MetaBot call. Use a placeholder such as ***SUBJECT***
and replace that section of code to send an email. See below:

15. If a robot is ran on an attended environment, then you must disable the keyboard and mouse
for that task execution

16. If a robot is running unattended on a physical machine then the robot must lock the computer
after task completion

17. Because the Screen Recorder uses screen scraping and X,Y coordinates, it should be used as a
last resort.

18. Path should not be used ALONE when identifying controls on a page. Path should be coupled
with other attributes on the webpage to ensure the correct control is integrated.

19. Do not use DOMXpath when identifying controls on a page if the result is index based.
Developer must write Xpath that is not index driven.
20. The robot, as written, must be able to be run on DTP or a VDI without changing the code. (File
structure and shared drive must all match)

21. After completion of the task being run, return the desktop to an initial state (Close all opened
windows, etc..)

22. All strings (excluding widow Titles) should be read from the string file. Window titles are not to
be read from the string file.

23. IMPORTANT NOTE: Variables are passed through tasks by reference. Values are passed both
downstream and upstream. Whatever is done from the ran task is reflected on the task calling that
particular variable.

Steps To Identify The Object Cloning Technology.

1) Open AAE Task Editor, Add Object Cloning command.

2) Capture object and verify technology type on Object Cloning command window.
1) For Windows Applications; select the following properties as Search Criteria:
Name, Class, Type, Path

2) For Web Applications, select the following properties as Search Criteria:


Name, Type, Path, HTML ID, HTML Name, HTML Tag
Remove HTML Href from Search Criteria list. Select Value ONLY if it remains static.

Note: Make sure path properties remains static otherwise Uncheck the path property (the icon) from
Search Criteria list.

Guideline for HTML Technology.

1) Make sure IE-11 Plugin is installed to capture object on Internet Explorer version 11. You can do that
from Tools -> Options -> Plugin Settings.
2) Select Path, DomXPath, Path, HTML ID, HTML Name, HTML Tag, HTML Type, HTML Title property for
HTML objects as Search Criteria.

3) Make sure Path properties remains static otherwise uncheck the Path property.

Note: User can switch the technology between Standard and HTML using following configuration
settings in (AA.Settings.xml located at Application Path)
For Standard Technology For HTML Technology
<advancedsettings> <advancedsettings>
<recordertechnology>0</recordertechnology> <recordertechnology>1</recordertechnology>
</advancedsettings> </advancedsettings>

Guideline for Java Accessibility Technology.

1) Make sure Java Plugin settings are configured for appropriate JRE. (Read Java Settings configuration
document). You can do this from Tools -> Options -> Java Settings

2) Make sure Java Application and Automation Anywhere both are running with similar access privileges
(Administrator or normal)

3) Select Name, Type, and Path property for java objects as Search Criteria.

Guideline for Flex Technology.

1) Make sure Flex plugin is installed. You can do this from Tools -> Options -> Plugin Settings.

2) Please verify “%homedrive%%homepath%” is not configured on network drive. (Kindly contact your IT
support if this is the case)

3) Make sure Automation Anywhere client application is successfully launched before opening the flex
application.

4) Select the following properties for Flex Web/Desktop Application’s object:

Name, Value, Class, Type, Path as Search Criteria.

5) Uncheck Index property for flex object, make sure Name property remains static otherwise do not
select the Name property for Search Criteria.

DOM/XPath - XPath (Relative and Absolute) recorded in browsers to minimize changes


while running tasks across browsers.
Note: It is possible to insert search criterion for a DOMXPath.
According to the World Wide Web Consortium, "XPath ( XML Path Language) is a query
language for selecting nodes from an XML document. In addition, XPath may be used to
compute values from the content of an XML document." To know more about Xpath click
here

Vous aimerez peut-être aussi