Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
‘General Run Error’ when trying to fetch URL in Browser Address Bar with DP
#1
Not Solved
Below is the code snippet:

Code:
strBrowserTitle = Browser(“Index:=0″).GetROProperty(“title”)
strPageTitle = Browser(“Index:=0″).Page(“Index:=0″).GetROProperty(“title”)

strNewURL = Browser(“title:=”&strBrowserTitle&”").Page”title:=”&strPageTitle&”").GetROProperty(“url”)

This last line of code gives this error. Also tried the below variation but again getting the same error:

Code:
strNewURL = Browser(“title:=”&strBrowserTitle&”").Page”title:=”&strPageTitle&”").Object.URL

This code used to function properly before but all a of a sudden it started giving "General Run Error".
Reply
#2
Not Solved
Could you please double check your script?
Reply
#3
Not Solved
What do you mean ? Did you find any flaw in the script ?
Reply
#4
Not Solved
Does browser support 'index' property?. Not sure..'Creation Time' is there...
Reply
#5
Not Solved
Try
Browser("title:= about:blank").Navigate "url"

URL= give the required url there and make the home page to blankmin internet options before running the script
Reply
#6
Not Solved
Hi.. It looks like the brackets (in page) and the double quotes are not correct in your line of code..

Actual:
Code:
strNewURL = Browser(“title:=”&strBrowserTitle&”").Page”title:=”&strPageTitle&”").GetROProperty(“url”)

Expected:
Code:
strNewURL = Browser("title:="& strBrowserTitle).Page("title:="& strPageTitle).GetROProperty("url")

Please try with the above(Expected) one...
Ensure that the values you pass for the strBrowserTitle and strPageTitle are also correct.
Incase you are not sure, then try the below one (but ensure that u have opened only one IE browser at the time of execution)..
Code:
strNewURL = Browser("name:=.*").Page("title:=.*").GetROProperty("url")
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  General run error when Exist fails msacks 1 1,650 02-08-2019, 02:12 AM
Last Post: Ankur
  Take Entire screen shot including scroll bar. venkatesh9032 0 1,765 12-26-2016, 06:14 PM
Last Post: venkatesh9032
  How to press the space bar with send keys method Hari Prasad 5 24,618 06-03-2016, 10:47 AM
Last Post: Vijayaragavan.thangam
  General Object Error(Find Object Error) akhandesh 1 3,410 02-24-2016, 01:05 PM
Last Post: sindhus
Rolleyes The test run cannot continue due to an unrecoverable error neerndg123 3 8,417 09-17-2015, 08:27 PM
Last Post: ananthakumarbe

Forum Jump:


Users browsing this thread: 1 Guest(s)