if there is two login button in your page, how you know that
this login button is correct for login .

Answers were Sorted based on User's Feedback



if there is two login button in your page, how you know that this login button is correct for logi..

Answer / nagesh

If there are two login buttons,then go with index value
using descriptive programming.first we should make sure that
which login button navigate to required page.then give
corresponding index value as property in script as follows.

Broser("BR").page("PG").webbutton("index:=2").click

or

set objbutton=Description.Create()
objbutton("micclass").value="Webbutton"
objbutton("index").value="2"

browser(br).page(pg).webbutton(objbutton).click

Is This Answer Correct ?    2 Yes 1 No

if there is two login button in your page, how you know that this login button is correct for logi..

Answer / rangalnrt

But before going operate the button check whether that button is enabled or disabled


set objbutton=Description.Create
objbutton("micclass").value="Webbutton"
objbutton("name").value="login"

set childs = B().P().childobjects(objbutton)

for i=0 to childs.count-1 step 1

if Broser("BR").page("PG").webbutton("index:="&i).getroproperty("Enabled") then
Broser("BR").page("PG").webbutton("index:="&i).Click
end if

Next

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

Tell some commonly used Excel VBA functions?

0 Answers  


regular expression in qtp standar check point for months from accepting months from january to december only

0 Answers  


How do you change Logical Name of the object in test script?

1 Answers   TCS,


How u call functions in QTP

5 Answers   Lehman Brothers,


Did the scripts need lot of maintenance? If yes, why?

0 Answers  






What is the difference between functions and actions in QTP?

7 Answers   Verizon,


How will you set a unique four digit number in an edit field in QTP?

2 Answers   IBM,


Which object model ur used in ur project

2 Answers   Cap Gemini,


UFT 12.02 which ALM version will support

0 Answers  


Explain the parameter in qtp?

0 Answers  


Suppose i have a script which is having 100 lines.I want to execute that script starting from line no 75.means first qtp should read the script from line no 75 how can u do it.

5 Answers   Lehman Brothers, rsystems,


What is the script for database check point, bitmapchek point, regular expression ?

0 Answers  


Categories