Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Deleting portion of URL using QTP and Appending to Existing URL
#2
Solved: 12 Years, 10 Months, 2 Weeks ago
Get the Current page url
take out the portion of url you want to remain
and then append your desired url portion in it.

I have tried to do this in form browser itself, see the code below
Code:
sPageUrl = Browser("Deleting portion of URL").Page("Deleting portion of URL").GetROProperty("url")
sMainUrl = Mid(sPageUrl,1,instrrev(sPageUrl,"/"))
sMainUrl = sMainUrl & "storing-data-in-excel-sheet-t-2828.html"
Browser("Deleting portion of URL").Navigate sMainUrl

Reply


Messages In This Thread
RE: Deleting portion of URL using QTP and Appending to Existing URL - by Saket - 12-11-2009, 12:34 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Code not recognising Browser object as existing brigna 0 2,147 12-04-2014, 08:32 PM
Last Post: brigna
  Qtp can not identify existing script prit deo 0 2,189 03-03-2014, 04:23 PM
Last Post: prit deo
  Need to embed worksheet to already existing excel mahaktikoo 1 2,801 09-27-2012, 12:13 AM
Last Post: krr
  How to identify the object reference to the existing(already opened) Excel sheet yogeesh 1 10,493 09-26-2012, 07:00 PM
Last Post: krr
  ‘General Run Error’ when trying to fetch URL in Browser Address Bar with DP sukhvinderh 5 6,469 10-14-2011, 07:29 PM
Last Post: v.swaminathan

Forum Jump:


Users browsing this thread: 1 Guest(s)