![]() |
| |||||||
Automation Anywhere Post messages and questions related to Automation Software here. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| |||
|
I need to figure out how to use a variable as part of a caption. I have the variable being used as a search term but then I want to select the correct entry after the search returns. I tried adding * before and after the variable but that doesn't work. Basically I search for "Tom" and it returns "Tom is great" so when I use the manage website control I need it to select "Tom is great" but it's only looking for "Tom" Please help. |
| |||
|
Hello EveryMercahnt, You will have to use "String Operation" command with "Before-After" Operation type for extracting "Tom". For example: By following the below steps you can extract "Tom" from the string "Tom is great" Command: String Operation Operation: Before-After Source String: Tom is great Before: (leave it blank) After: (1 space, i.e. Hit the spacebar key once) Assign the output to any variable and use message box with this variable to display the result. After running the task, the message box will display "Tom" Let us know if you have any doubts. Thanks & Regards |
| |||
|
I don't need to extract from a string. I have "Tom" as a list type variable I need to use "Tom" as a part of a caption for a web control. I don't know ahead of time what the caption will read. I just need the program to select the first thing that has "Tom" in it's caption. I hope that makes more sense. |
| |||
|
The task I have isn't complete. I'm basically looking for a string modifier like if I was searching in windows for a .gif but couldn't remember what the file name was I could search for *.gif and it would return everything ending with ".gif" or if I searched for "bob*" it would return everything beginning with "bob" |
| |||
|
Hello EveryMerchant, This can be easily done in Automation Anywhere. Use Each file in a folder loop and use If condition with the system variable "extension"=gif For example: Start Loop " Each File in C:\aa" If $Extension$ Equal To "gif" Then End If End Loop But this will work only if all the files are in one folder. For the file name which has "bob" in it, you can use the following: Start Loop " Each File in C:\aa" If $FileName$ Includes To "bob" Then End If End Loop Thanks & Regards |
| |||
|
Hello phil & EveryMerchant, Following is the text file of the task: 1 Start Loop " Each Folder in C:\aa" 2 If $Extension$ Equal To "gif" Then 3 Comment: Your Conditional Code.. 4 End If 5 Comment: Second Condition ` 6 If $FileName$ Includes "bob" Then 7 Comment: Your Conditional Code.. 8 End If 9 End Loop Thanks & Regards |
| |||
|
I believe that He doesn't need help parsing a string. ***He needs help finding and selecting a control with caption on a web page.*** Read the original question again. He finds the control with "Tom is great" but it looks like he can't CLICK to activate it. >>> Basically I search for "Tom" and it returns "Tom is great" so when I use the manage website control I need it to select "Tom is great" but it's only looking for "Tom" <<< Phil |
| |||
|
Hello EveryMerchant, According to Philkryder's reply, we will have to take a look at the website which is having this control so that we can guide you with proper solution. Please send us the url of the website. Thanks & Regards |
![]() |
| Thread Tools | |
| Display Modes | |
| |