Forum Discussion
Using Python script with test complete tool. Find web object and if web object found next step is to navigate next line and click on the URL link. Why i am trying this because URL link is dynamic.
Is it possible to traverse in web page using regular expression? if yes please let me know the syntax.
If you don't want to go the name mapping route there are several find methods available to Test Complete objects.
- Ashoka7 years agoNew Contributor
Thanks for response.
My question is after matching web object I need to go to next line form matched object and I need to click on URL link.
Please find the attachedscreenshot.
Eg: Found "Login Page" underneath there is a URL link I need to click on the url link, Here I cant search URL link because its dynamic.
Please let me know the solution in regex or any other ways
- cunderw7 years agoCommunity Hero
The link I provides ways to use regex or wildcards in your search criteria. Not sure what else to give you as I don't know how the structure of your page or what part of the url is dynamic. Also, just because the url is dynamic does not mean you can't search for. For example it's the only link inside that login panel you could search by index and object type.
From the documentation:
PropValues
An array containing the values of the specified properties or a single property value (see Remarks).
You can enter the item’s index (from 0) or its caption. The caption can contain asterisk (*) or question mark (?) wildcards or regular expressions. The asterisk (*) wildcard corresponds to a string of any length (including an empty string), the question mark corresponds to any single character (including none). To specify more complicated parts of a caption, use regular expressions. For information on them, see the Remarks section below.
The caption can be case-sensitive or case-insensitive depending on the value of the Use case-sensitive parameters project setting. Regular expression patterns are always case-insensitive.
- Ashoka7 years agoNew Contributor
Cundrew,
Here I attached webpage appearance, in link panel there are multiple login links Admin, Viewer. After finding Viewer in web page there is a link under Viewer. I need to click on url link after viewer or admin name. Please let me know the solution.