05-15-2012, 07:43 PM
Hi,
I have the below code. It works until I get to the first if statement and leave the page and then return back. Then it breaks with a General Run error. Any ideas?
I have the below code. It works until I get to the first if statement and leave the page and then return back. Then it breaks with a General Run error. Any ideas?
Code:
Set links = Description.Create
links("micclass").value = "Link"
set allLinks = Browser("BROWSER").Page("PAGE").ChildObjects(links)
link_count = allLinks.count
For i=0 to link_count -1
[u][b]url_temp = allLinks(i).GetROProperty("href") [/b][/u]
If inStr(url_temp, "javascript:gotoLINK") then
url_temp = Replace(url_temp,"javascript:","")
url_temp = Replace(url_temp,";","")
Browser("BROWSER").Page("PAGE").RunScript(url_temp)
Browser("BROWSER").Sync
Browser("BROWSER").Page("PAGE").Link("RETURN_TO_HOME").Click
end if
Next