Automating Test Automation Home Automation Articles Downloads QTP Gotchas Links Books Contact About Site Map
Gotchas - DP and Regular ExpressionsSome time ago I was trying to replace some OR (Object Repository) code with some DP (Descriptive Programming). The resulting DP code kept failing.
The reason turned out to be that the referenced link name contained brackets. When converting OR to DP, you have to remember that DP handles regular expressions. Regular expressions are powerful and can be very useful, but in this case they were getting in the way. You need to 'escape' any regex characters by prefixing then with a backward slash ("\"). > The Characters affected are $, (, ), *, +, ., [, ?, ^, {, and | I have a function for handling this situation here. |