Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GetROProperty error when used in a for loop
#1
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?

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
Reply
#2
What version of IE are you using??

Are you getting the proper count for child objects? Do check.

Regards,
Ankesh
Reply
#3
Using IE 8 and the child count is correct.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  General run error. Line (18): "Loop while Browser("Index:=0").Object.Busy" AshokReddy 3 5,941 12-20-2013, 01:44 PM
Last Post: sshukla12
  FOR LOOP shayk1985 1 5,761 12-13-2012, 11:35 AM
Last Post: sams001
  How to exit from a for loop silpavinod 2 10,953 10-17-2012, 12:55 AM
Last Post: agarwl.anurag
Smile How to Select GetROproperty value in GUI sangitarm 2 5,209 10-15-2012, 11:52 PM
Last Post: agarwl.anurag
  for loop sia sharma 1 3,720 09-13-2012, 11:44 AM
Last Post: ksrikanth2k9

Forum Jump:


Users browsing this thread: 1 Guest(s)