In a Java table, all cells have different color so write a code for finding a particular cell color.
Code
For i =1 to B().P().WebTable().GetROProperty("rows") For j=1 to B().P().WebTable().ColumnCount(i) B().P().WebTable().GetCellData(i,j).object.bgcolor i=i+1 j=j+1 Next Next
I wrote descriptive programming for textbox and getting general run error in this line "set base=browser("name:=gmail: email from google").Page("title:=gmail: email from google").Childobjects(desc)". how to handle the error.
please use message err.number and err.description to exactly find out the error.
How can we determine the records count of a web table through QTP?
use rowcount method.
Ex: Browser().Page().Webtable().RowCount
How to fetch the values which is inside webelement(weblist identified as webelement)?
use getroproperty
Hi, i have to perform click on 6 “+” icons on 6 tabs having same alt property and file name and I use index also but I won’t help me , so any good idea how to perform click on these 6 tabs,also im using below script for these. browser(“”).Page(“”).Webtable(“innertext”).Image(“alt:=select...
Use descriptive programming
In which codition we choose screen or window options in analog recording?
Recording relative to screen means operation based on screen co-ordinates, and the same with window recording means recording based on window co-ordinates
We need to use Analog recording when there is a need to check the object or need to do something based on the x,y coordinates of the application.
How can I use childobjects in QTP for identification of webelements
I wrote this code: set odesc = description.Create() odesc.Value("class name")="webelement" odesc.Value("innertext")= job job is name of parameter with string value-user defined params. ex.Job = "officemanager". set obj =browser().Page().Childobjects(odesc) set obj_number = obj.Count but...
Set obj =Browser().Page().Childobjects(odesc) Set obj_number = obj.count this count represents the number of objects that are satisfying the description that you have made using description.create()....
Answered by: Brahma Sagar Gunda
View all answers by Brahma Sagar Gunda
Member Since May-2006 | Answered On : May 5th, 2006
The following list the Operating Systems that QTP supports, please refer: - Windows 2000-Service Pack 3 or Service Pack 4 - Windows XP-Service Pack 1 or Service Pack 2, - Windows 2003 Server. Note: QuickTest Professional is supported on Windows XP Service Pack 2 only if the execution prevention mechanism (also known as DEP-data execution prevention and NX-no execution) is not activated I believe this answers your questions and will thereby close this service request. Should you require further clarifications, please do not hesistate to let me know. Thanks. Regards, Brahma Sagar
Hi Vish,
Kindly install microsoft script debugger and then restart the QTP.
Regards,
Gaurav
Yes it true that QTP works on Windows OS only but it works fine on browsers others than IE as well(Mozilla Firefox is supported)
How to access a test input parameter?
this is how you can access test input parameter till QTP 11.00 myVar = TestArgs("inputparamName") you can use his in parent action in the test.. to use in other child actions you have to pass this pa...
Hi,
Using Parameter("Parameter Variable").
regards,
Purna
I am using the for loop to get data from the data table. The summary code is:c=datatable.Getrowcountfor i=1 to cmsgbox datatable.Value("column1")next'the message box always returns data of row 1. Irrespective of the iteration. How is it possible.
iRows=DataTable.getrowcount
For i=1 to iRows
DataTable.SetCurrentRow(i)
MsgBox DataTable("Test", dtGlobalSheet)
DataTable.SetNextRow
Next
Hi I hope this will useful to u
Code
c=datatable.getrowcount for i=1 to c datatable.setcurrentrow(i) msgbox datatable.value("column1") next
Application throwing error while running the script
I am fresher in QTP. Till now I have faced only the error thrown by QTP. What needs to be done when application throws an error?? How to handle it through QTP??
We can use here recovery scenarios.
How do you close the task manager through QTP?
QTP Scripting is easy way.
First we need to identify the task manager and then close the program by 3 ways: using CloseProcessByName using CloseProcessById CloseProcessByWndTitle methods we can close sny application. Now we wi...
Is there any way to convert .Tsr (object repository) file to an XML file?
I was not able to do this in QTP 11.
In QTP 9.2, there is an option to export to XML file
from Object repository manager, File-> Export to XML option is there.
Is this what you wanted or something else
Regards,
Meena
If var="a1bc23"->separate this string into two strings like, abc, 123
Code
dim a,x a="ab1c23" for i=1 to len(a) if asc(mid(a,i,1))<>32 then if asc(mid(a,i,1))>=97 and asc(mid(a,i,1))<=122 and asc(mid(a,i,1))>=65 and asc(mid(a,i,1))<=90 then mystring=mystring&mid(a,i,1) else if asc(mid(a,i,1))>=48 and asc(mid(a,i,1))<=57 then mynumber=mynumber&mid(a,i,1) end if end if end if next msgbox (mystring) msgbox (mynumber)
QTP scripts from quality center
How to run QTP scripts from quality center
This script Answer is: it will connect to QTP server first then the user will give the username and password and Enter in to the particular login page.
Firstly we got to download Mercury Quality Center Connectivity Addin and QuickTest Professional Addin Open QC,Create a new Subject in Test PlanThen place all your QTP scripts in folderOpen Q...
What is smart identification in QTP
Smart identification to identify the dynamic object smartly, this is used only for web applications. The base filter information will be in mandatory property and the associated properties details wil...
Whenever normal identification fails due to the dynamic changes in the properties of the objects, QTP uses Smart Object Identification which is a unique feature of QTP.
Smart Identification is an algorithm used by QTP when it is not able to recognise an object.
QTP not capturing the page for web application
Hi am using QTP 9.2 version.Window applications are working fine,but for web applications QTP is not capturing the page when we click the (add objects to local icon) and the objects are not getting added in object repository.Am using ie9 and os is windows 7.I don't know if some settings are wrong in...
QTP 9.2 version doesnt supports IE9
QTP 9.2 supported browsers are IE6 and IE7
Turn off your protected mode in IE and also disable User Access Control setting in windows 7
It will work fine :)
How to test login module with different username and password by using data driven testing in QTP.
We can use Data Table for this purpose (i.e. either local Data Table or global Data Table). We can put datas to the Data Table under columns declared as username and password (i.e. column names are gi...
Here is the script below for gmail log in page. "vbscript SystemUtil.Run "iexplore.exe" Browser("micclass:=Browser").Navigate"http://www.gmail.com" Browser("title:=Gmail","micClas...
How will we know if the test case is executed correctly or not?
After execution of the script, how we will come to know that test case is executed correctly or not?
After execution of the script for a test case, we can insert print message or alert box in the script which can show us the immediate result after a script run which will help us determine whether a particular test case executed correctly or failed.
Put some print messages in the scripts so that after running the script you can see the test result and easilt identify whether its pass or fail.
6 types of automation frameworks are there.
Linear/modular/data-driven/keyword driven/hybrid/BPT framework
Hi
There are four types of automation framework :
1) Linear
2) Structured
3) Keyword Driven
4) Data Driven