if there is a web table of having row and colmns.a button is
placed at 2nd row's 3rd column which is worked for both edit
and delete..how to write script for the button to test both
operation on the web table using desriptive programing..
plz help me on script wheather using getroproperty

Q2)what is the command for taking valiue from a web table in qtp

Answers were Sorted based on User's Feedback



if there is a web table of having row and colmns.a button is placed at 2nd row's 3rd column wh..

Answer / ganesh kumar

Using Descriptive Prograaming first identify the Properties
that are unique to recognize the webtable. After use
the 'ChildItem' method of webtable and create a Dynamic
object Model and then use the GetROProperty to fetch the
name of the button placed at 2nnd row and 3rd column.

Ex:
set objButton=Browser().page().frame().webtable().childitem
(2,3,"WebButton",0)
strname=objButton.getroproperty("name")
msgbox strname

The Above code Displays the name of the Button placed at
2nd row and 3rd column

Is This Answer Correct ?    24 Yes 2 No

if there is a web table of having row and colmns.a button is placed at 2nd row's 3rd column wh..

Answer / narendra

Answer for 2nd question is
Browser().page().WebTable.GetCelldata(2,3)

Is This Answer Correct ?    17 Yes 4 No

if there is a web table of having row and colmns.a button is placed at 2nd row's 3rd column wh..

Answer / sada

Using Descriptive Prograaming first identify the Properties
that are unique to recognize the webtable. After use
the 'ChildItem' method of webtable and create a Dynamic
object Model and then use the GetROProperty to fetch the
name of the button placed at 2nnd row and 3rd column.

Is This Answer Correct ?    3 Yes 0 No

if there is a web table of having row and colmns.a button is placed at 2nd row's 3rd column wh..

Answer / saravanaraja

The Below code is working for a Grid that contain Many rows.

Here .* indicate Page Title. Index number indicate 5 th row
Delete Link.

Browser("Title:=.*").Page(("Title:=.*").Link("html id:= ;
Index=4).Click

Is This Answer Correct ?    4 Yes 3 No

if there is a web table of having row and colmns.a button is placed at 2nd row's 3rd column wh..

Answer / naina

Using Descriptive Prograaming first identify the Properties
that are unique to recognize the webtable. After use
the 'ChildItem' method of webtable and create a Dynamic
object Model and then use the GetROProperty to fetch the
name of the button placed at 2nnd row and 3rd column.

Ex:
set objButton=Browser().page().frame().webtable().childitem
(2,3,"WebButton",0)
strname=objButton.getroproperty("name")
msgbox strname
objButton.Set "Example" //For Webedit opertaion
objButton.Click //For Delete opertaion

Is This Answer Correct ?    1 Yes 0 No

if there is a web table of having row and colmns.a button is placed at 2nd row's 3rd column wh..

Answer / ashish srivastava

For Ques 1
Browser().page().webtable().childitem
(2,3,"WebButton",0).Click

For Ques 2
strname=Browser().page().webtable().GetCellData(2,3)
msgbox strname

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

Can anyone explain about Keyword driven framework in detail and how to use it in case of any project

4 Answers  


Can you list some technologies that support qtp?

0 Answers  


VM1 = "Invalid username or password. Please try again. " VM2 = "Email id is required.Password is required. " VM3 = "Email id is an invalid e-mail address.Password is required. " VM4 = "Password is required. " VM5 = "Email id is required. " VM6 = "Email id is an invalid e-mail address. " 'Rowcount of the Local sheet Rowcount = DataTable.GetSheet("Invalid login transactions").GetRowCount 'Valid emailid and Password Emailid = "test@iteamic.com" Password = "Password0" 'For i = 1 to Rowcount 'Parameterised Email_id Browser("Browser").Page ("Page").WebEdit("emailAddress").Set DataTable("Email_id", dtLocalSheet) EID = Browser("Browser").Page ("Page").WebEdit("emailAddress").GetRoProperty("value") 'Parameterised Password Browser("Browser").Page ("Page").WebEdit("password").Set DataTable("Password", dtLocalSheet) PWD = Browser("Browser").Page ("Page").WebEdit("password").GetROProperty("Value") If EID = Emailid And PWD = Password Then Reporter.ReportEvent micPass, "EID & PWD check", "Email id and Password is correct, One iteration of Invalid login attempts is not being executed" Else Browser("Browser").Page("Page").WebButton ("Sign-In").Click 'Output value exported to the local sheet Browser("Browser").Page ("Page_2").Output CheckPoint("Home page_Sign in") 'Storing the output value in a variable(OUTPUT OUTPUT = Datatable.GetSheet ("Invalid login transactions").Getparameter ("Validation_message_signin").value 'comparing the Variable Output and the Validation message for a given input If OUTPUT = VM1 Then Reporter.ReportEvent micPass, "VM1", "Invalid username or password. Please try again. " else if OUTPUT = VM2 Then Reporter.ReportEvent micPass, "VM2", "Email id is required.Password is required. " else if OUTPUT = VM3 Then Reporter.ReportEvent micPass, "VM3", "Email id is an invalid e-mail address.Password is required. " else if OUTPUT = VM4 Then Reporter.ReportEvent micPass, "VM4", "Password is required. " else if OUTPUT = VM5 Then Reporter.ReportEvent micPass, "VM5", "Email id is required. " else if OUTPUT = VM6 Then Reporter.ReportEvent micPass, "VM6", "Email id is an invalid e-mail address. " else Reporter.ReportEvent micFail, "EID & PWD check_FAIL", "Validation message checkpoint failed. The captured v msg is not required" End if End if I am getting syntax error saying "Expected 'End If'" at the last line, Why is this? Kindly explain...

1 Answers  


How many types of actions are there in quicktest professional?

0 Answers  


i'm using the qtp to test to vb appliction,i wanted to get the new application's title.i didn't want to use the winAPI to get it ,i 'd like to know whether a QTP function can do it. Eg: SystemUtil.Run "C:\Program Files\.....","","","" 'run an application, and misure the application is activating,then how to get the hwn wihtout using windowns api

0 Answers  


How to get line numbers in your editor in expert view?

1 Answers  


I am automating a Java application. This application is developed using SWT. I am not able to get the GUI object. Even i tried with Java add-in. In tutorial it states SWT is not supported any idea. Anybody worked in such appln. My question is whether it is possible to record the GUI object of SWT appln. how it is possible.

1 Answers  


Can any one send me the QTP Basic Coding Samples?

0 Answers  


How to test whether the navigation i.e. from one page to another is working r not using QTP for web based application. plz explain in detailed or mail the sample code to malepatin@gmail.com

1 Answers  


distinguish between old version and new version QTP features.

0 Answers   CTA,


in process of project exaplnation the defects are says frequently r not?

1 Answers  


How i can test the background color of the records displayed in a Table. Eg i have a .net desktop application and there is a Table(swftable) with records displayed in the grids. i have to validate whether the 1st record is displayed in white background color and 2nd record in light blue background color...But the constraints is that once user click on the first record...the background color changes to grey.......Plze let me now how to validate this with QTP 9.2.

9 Answers   Accenture,


Categories