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

Does quicktest professional (qtp) is unicode compatible?

0 Answers  


difference between GetRoProperry and GetToProperty.and where we've to use exactly those properties

5 Answers   Wipro,


Which HTML specification will be adhered to? How strictly? What variations will be allowed for targeted browsers?

0 Answers  


What are some test assets and related extensions of qtp?

0 Answers  


how we will use output values in qtp? is there any possibulity by descriptive programming?

2 Answers  






What is chaild object method? When we will go for chaild object method? How to use chaild object method?

2 Answers  


How many ways we can parameterize data in QTP?

6 Answers   Liquid Crystal,


What r the advantages of automation?

3 Answers  


Explain building blocks of the bpt framework ?

0 Answers  


How to use the Object spy in QTP 8.0 version?

2 Answers  


write a qtp script to enter user name & password for flight reservation login page from excel sheet

1 Answers  


How to handle the exceptions using the recovery scenario manager in qtp?

0 Answers  


Categories