The issue is that I want to decide the future course of action within the script based on the url. The url is the only place I can know which sub / function to call.
I cannot use a checkpoint as I do not know the url upfront. I want to trap the url and subString it to capture a value and divert the script according to the captured value which can be one among 500 values...
Have you considered creating a function to retrieve the URL? Then passing it to a sub procedure which contains conditional statement? In order to divert the script, you have to know the value you are looking for, I'm hoping the following may at least help you get started.
Step one: Create your sub procedure in a script, where I have "AS-2" and "FS-1" you would have your predetermined URL or expected result.
Select Case (task2)
Println("this test was successful")
Println("this is not the expected value")
'This can be anytype of conditional statement.
'Maybe a For loop with a nested If statement
'to compare the retreived value against an
'external data sheet/database with the expected values.
Step 2: In another script retrieve your value within a function and pass it the argument.
t = Window("Report").ComboBox("cboCounter").property(" Text")
My results in the report then look like:
this test was successful
I perfer not to use the GetControlData, its just a personal preference.
If you have some idea of the path you will take based on a portion of the URL, you could probably parse X per the previous suggestion before passing it on.
"We may encounter many defeats but we must not be defeated."