with out object repository i need to launch IE and then
navigate to a login page and then operate the objects
within the page. How will be the script?

Answer Posted / rajesh

If Browser("index:=0").Exist(1) then
hWindow = getHandleBrowser
Browser("hwnd:=" &
hWindow).Navigate("http://www.google.com")
'msgBox "Opened URL"
Browser("hwnd:=" & hWindow).Sync
wait 2
else
SystemUtil.Run "iexplore.exe",
"http://www.google.com", "", "open"
hWindow = getHandleBrowser
Browser("hwnd:=" & hWindow).Sync
End If
Browser("hwnd:=" &
hWindow).Page("title:=.*").Link("name:=Images","index:=0").Click




Function getHandleBrowser
wHandle1 = Browser("index:=0").GetROProperty("hwnd")
getHandleBrowser = wHandle1
End Function

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many ways is to parameterize the value?

617


What is the standard timing delay for web based application in qtp?

587


How many types of actions are there in quicktest professional (qtp)?

536


Plz Explain AUTOMATION REFERENCE MODEL?

1681


For example you are checking bit map check point before coming to the results. How can you say it is passed? Or failed? Anyways?

617






The hybrid framework can be implemented for any application. Is it true?

587


How many types of trigger events are there in qtp?

549


In the application that I'm testing is having a WYSIWIYG editor.QTP is recording editor's body as web element. I want to add some data to this web Element at run time. The problem is that I cant find a method to add contents to this web Element. Can any one come up with an answer for this. Thankx.

1443


hi all can any body explain how to write the script for finding the mandatory fields which are having [red Astrik sign (*)]

1462


I have written a code to fetch values fro access db and place in the fields. Iam using GetROProperty to fetch runtime values. Now i want to add runtime values to the access db in field v3. please help me. Its not writting in the db. Option explicit Dim con,rs,db,c Set con=createobject("adodb.connection") Set rs=createobject("adodb.recordset") con.Open "Driver={Microsoft Access Driver (*.mdb)};dbq=D:\Sales.mdb" rs.open "select * from tax",con Do while not rs.eof Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("incost").Set rs.fields("v1") Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("intax").Set rs.fields("v2") c=Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("outtax").GetROProperty("value") rs.MoveNext print c Loop Do while not rs.EOF rs.EditMode rs.Fields("v3").Value="3" rs.Update rs.MoveNext Loop Set rs=nothing Set con=nothing

1485


when I try to run below script in QTP "totalPages" value is 2. But i am getting error message (Type mismatch: 'totalPages' Line (): "For i=1 to totalPages".) totalPages=Browser("Name:=User").Page("Title:=User").WebElem ent("innertext:=of.*").GetROProperty("InnerText") msgbox totalPages For i=1 to totalPages rnum=Browser("Name:=User").Page("Title:=User").WebTa ble("column names:=User Name;ID;Last Name;First Name").GetRowWithCellText("store4") If rnum>0 Then r=rnum Exit for End If Browser("Name:=User").Page("Title:=User").WebElement ("html tag:=A","x:=471").Click MsgBox "Exit" Next

3277


how will you check how many members visited the website www.infosys.com?

1480


What are test settings and global settings?

579


What are the different properties of an web object

1428


i want information about API testing and i want info like how process can be done in company? i want added info like coding ,debugging, desing in c.v ? what should add in c.v for eg banking domin? pls any answer my question?

1606