Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

How can we parameter a Web link

This is a discussion on How can we parameter a Web link within the QTP forums, part of the Software Testing category; How can we parameterize the link? The scanarios is as follows: 1) Clink on a link and enter the page 2) there will be table which contains the fields like ...

Go Back   Geeks Talk > Software Testing > QTP
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read
  #1 (permalink)  
Old 10-18-2007
Junior Member
 
Join Date: Sep 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
iliaz.shaik is on a distinguished road
How can we parameter a Web link

How can we parameterize the link? The scanarios is as follows:

1) Clink on a link and enter the page
2) there will be table which contains the fields like "UsedID,Address,ZIP"
3) Close the page

How can we automate this scenario?

Thanks in advance.
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-19-2007
Junior Member
 
Join Date: Sep 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
iliaz.shaik is on a distinguished road
Re: How can we parameter a Web link

Can anyone please solve the above Scenario
Reply With Quote
  #3 (permalink)  
Old 03-25-2008
Junior Member
 
Join Date: Mar 2008
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
chanduU is on a distinguished road
Re: How can we parameter a Web link

hai iliaz...is that the link in a table..if its in a table then u can use the getcelldata...and click on the link...becoz the link will always appear in a particular cell...
Reply With Quote
  #4 (permalink)  
Old 03-25-2008
Expert Member
 
Join Date: Oct 2007
Location: Mumbai
Posts: 354
Thanks: 4
Thanked 58 Times in 47 Posts
bizzzzzare will become famous soon enough
Re: How can we parameter a Web link

Hi Iliaz,

can you please explain as to why you are looking at parameterizing the Link.
Coz I guess the Link name is going to remain the same for every iteration.

Incase you are talking of different links existing and clicking on each would lead to page with a Table displaying some fields, I guess it makes sense to parameterize the link click action.

NOTE : Only incase all the specified links occur in the same page, would you make sense to parameterize.

Include all Link Object names into your Local or Global Datasheet. The remaining operation prior to clicking and after clicking the link will remain the same.

The syntax would be - Browser("").Page("").Link(DataTable("ColumnName",dtLocalSheet)

You could also add checkpoints or simply use getCellData to validate the fields displayed in the webpages resulting from clicking on the links.

Let me know if this is what you are looking at.

cheers......
__________________
Regards,

V.Umesh Krishnan
QA Consultant
Reply With Quote
  #5 (permalink)  
Old 03-26-2008
Junior Member
 
Join Date: Mar 2008
Location: Bangalore
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
ManjuPillae is on a distinguished road
Re: How can we parameter a Web link

'Assume that the names of WebLinks present in the page are stored in 'LnkName' unser LocalSheet
'As we can identify the Weblink Using its 'name' property

set Lnk = Description.Create
Lnk("micClass").Value = "Link"

rcnt = DataTable.GetRowCount

For i = 1 to rcnt
DataTable.setCurrentRow(i)
Lnk("name").Value = DataTable("lnkName",dtLocalSheet)
Lnk.Click
'Copy The values in Table and store in dataTable
'Close the Window
Next
Reply With Quote
  #6 (permalink)  
Old 07-08-2009
Junior Member
 
Join Date: Dec 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
nbabu11 is on a distinguished road
Re: How can we parameter a Web link

Hi,
I need some information about passing the dynamic value in to weblink.
Mine is a web application. The script what i have is like this:
'Browser("Login").Page("Application").Frame("ScopeFrame").Link("DC4303788(Active)").Click
In which the data DC4303788" in Link method will get changed dynamically. I am able to get the value "DC4303788" in to a variable using getROproperty method. Now, instead of placing the value DC4303788 in to link method, i want to pass the variable where the value DC4303788 which i have.

Is it possible to pass any dynamic value into link method?
Pls help me out in this.
Reply With Quote
  #7 (permalink)  
Old 07-09-2009
Expert Member
 
Join Date: Apr 2008
Location: Tamilnadu
Posts: 1,465
Thanks: 15
Thanked 150 Times in 141 Posts
deepasree has a spectacular aura aboutdeepasree has a spectacular aura about
Re: How can we parameter a Web link

Hai friend,

Just try this

Method 1

dynamic1=Browser("Login").Page("Application").Frame("ScopeFrame").Link("html tag:=A").GetRoProperty("innertext")
Browser("Login").Page("Application").Frame("ScopeFrame").Link(dynamic1).Click

Method 2

Use regular expression.

Here I assume all link name is starting with DC so I am adding regular expression given below

Browser("Login").Page("Application").Frame("ScopeFrame").Link("DC.*").

Let me know if any issues exists

Thanks
Deepa
Reply With Quote
Reply

  Geeks Talk > Software Testing > QTP

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Clicking on corresponding add link JobHelper QTP 2 06-19-2009 10:11 AM
Type of Parameter Geek_Guest C# 1 11-20-2007 06:52 AM
Text link changes dynamically idaretomess QTP 2 10-24-2007 09:59 AM
Link values to table mapino Data Warehousing 0 10-16-2007 06:46 AM
how to link jsp pages banjali JSP 3 06-15-2007 08:11 AM


All times are GMT -4. The time now is 06:32 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved