Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
descriptive programing to click the link on web
02-22-2010, 05:09 PM (This post was last modified: 02-24-2010 10:53 AM by devanggoel.)
Post: #1
descriptive programing to click the link on web

can any one tell me the descriptive programing for clicking the link on web....like open the yahoo.com and click on the signin link.
Find all posts by this user
Quote this message in a reply
02-22-2010, 06:52 PM
Post: #2
RE: descriptive programing
Try following

Code:
Dim obj_ChkDesc

Set obj_ChkDesc=Description.Create
obj_ChkDesc(“Class Name”).value = “Link”
Obj_ChkDesc("name").value="Log in"

Browser().page().link(obj_ChkDesc).click

Also you can use following to highlight the link

Code:
Browser().page().link(obj_ChkDesc).Highlight
Visit this user's website Find all posts by this user
Quote this message in a reply
02-23-2010, 05:03 PM
Post: #3
RE: descriptive programing
Code:
systemutil.run "www.yahoo.com"

browser("name:=Yahoo").activate

browser("name:=Yahoo").page("name:=Yahoo_Page").weblink("outerhtml:=Inbox").click
or
Code:
dim des

set des=description.create

des("micclass").value="Link"

set cnt=browser("yahoo").page("yahoo_page").childobject(des)

msgbox cnt.count

for i=0 to cnt.count-1

     val_name=cnt(i).getroproperty("outerhtml")

     if (val_name=Inbox)  then

         cnt(i).click

     end if

Next

set des=nothing

D.Baba Fakruddin
Visit this user's website Find all posts by this user
Quote this message in a reply
02-25-2010, 01:49 PM (This post was last modified: 02-25-2010 01:53 PM by Saket.)
Post: #4
RE: descriptive programingghhhhhhhf
Hi D.Baba-
Please wrap your codes in proper tags, which makes your post more readable. I did it for you this time Smile
@devanggoel - always put your thread title that is relevant to the query not a generalised one, this way we can identify the queries better while searching for it. by the way what do mean by 'programingghhhhhhhf'

Thanks,
~Saket Kumar
[Linkedin][pdf Api for QTP]
It's so hard when I have to, and so easy when I want to...
Find all posts by this user
Quote this message in a reply
02-26-2010, 03:59 PM (This post was last modified: 02-26-2010 04:01 PM by prasadworld321.)
Post: #5
RE: descriptive programingghhhhhhhf
------------------------------------------------------------------------------------
1.Descriptive programme for FR login.
------------------------------------------------------------------------------------
Code:
InvokeApplication"E:\Program Files\Mercury Interactive\QuickTest Professional\samples\flight\app\flight4a.exe"
dialog("text:=Login").winedit("window id:=3001").Set"test"
dialog("text:=Login").winedit("window id:=2000").Set"mercury"
dialog("text:=Login").winbutton("window id:=1").Click

Descriptive Programming for Gmail Login Page
Code:
SystemUtil.Run "iexplore.exe","www.gmail.com"
Browser("name:=Gmail.*").Page("title:=Gmail.*").WebEdit("name:=Email").Set "abc"
Browser("name:=Gmail.*").Page("title:=Gmail.*").WebEdit("name:=Passwd").SetSecure "xyz"
Browser("name:=Gmail.*").Page("title:=Gmail.*").WebButton("name:=Sign in").Click
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Function to create web objects (like Browser, Link, Page, etc) Arena 2 265 04-03-2012 08:21 AM
Last Post: Arena
  QTP throws error on web elements when Descriptive programing used. nistalaramesh 20 5,851 10-11-2011 09:53 AM
Last Post: nistalaramesh
Exclamation How to click on Link having * in the Text neel72 3 1,040 05-03-2011 10:18 AM
Last Post: Rohan
  Click on Link of a Java Table guin.anirban 3 1,087 04-17-2011 01:49 PM
Last Post: guin.anirban
  How click a link in Lotus Notes Email from QTP HanQTP 0 1,286 09-22-2010 09:25 AM
Last Post: HanQTP

Forum Jump:


User(s) browsing this thread: 1 Guest(s)