Does anyone know of a way to script so that if one web page displays the script does something and if a different page displays, the script does something else?
I was thinking that it may be possible if the script could check the results of the check (a True/False statement possibly) instead of just logging them?
The system I am testing divides user between two instances of the site and they are each slightly different so the script needs to be able to check which instance it was directed to.
Thanks for any ideas you can provide.
You could do a screen scrape of text that you are looking for specifically. You would have to use the text captured and do a comparision. Here's the simple way to do it.
Dim strRet, strNeeded As String
Dim strComp1 As Integer
strNeeded = "This is what I need!"
strRet = Window(AttachWindowName).CaptureText(Left, Top, Width, Height)
strComp1 = StrComp(strNeeded, strRet, vbTextCompare)
If strComp1 = 0 Then
'Do what you need to here
'Put something here if you want or leave it out and just put end if
No doubt there are some better suggestions here. But I have used this to some success.
Sounds much better than anything I can come up with. Thanks so much.
If ExecuteCheck(A) = True then
elseif ExecuteCheck(B) = true then
do something else