raj dhiman


{ City } noida
< Country > india
* Profession * senior software engineer
User No # 6532
Total Questions Posted # 0
Total Answers Posted # 4

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 19
Users Marked my Answers as Wrong # 5
Questions / { raj dhiman }
Questions Answers Category Views Company eMail




Answers / { raj dhiman }

Question { 5429 }

did you perform retesting(DATA DRIVEN test) using functions
with out using datatable methods

how can you perform retesting using functions


Answer

May be solution i'm providing is not a DataDriven but it is
useful.

We can access the object property at runtime and then append
something in the property and then again insert into the object.

Like we have a text box amount having value = 10

So we can use

value1 =
Browser(".*").Page(".*").WebEdit("amount").GetroProperty("value")

value1 = value1 + 1

Browser(".*").Page(".*").WebEdit("amount").Set value1

Is This Answer Correct ?    0 Yes 0 No

Question { Cap Gemini, 9418 }

if devloper change only button names in present build then
script will execute or not , why? Only gui changed.......


Answer

If name is the only unique property for recognizing the
button then it will give error. But say if you have
different object identification property like html id. then
script will work without error.

Is This Answer Correct ?    10 Yes 4 No


Question { Polaris, 21728 }

In web page there is five OK buttons available, while
recording i click on 3rd OK button, How QTP identify the 3rd
OK button while running script? Is qtp identify 3rd ok button?


Answer

QTP add the OK button in OR and set its Property as

Descrion Property:
text = OK

Ordinal Identifier:

index = 2



QTP only uses Ordinal property i.e like Inedex property only
when all the description properties are same.

Is This Answer Correct ?    7 Yes 1 No

Question { 5752 }

I got an error "The"flightres" Dialog was not found in the
Object Repository. Check the OR to confirm that the object
exists or to find the correct name for the object." while
running the following script

Set flightres=description.Create()
flightres("text").value="Login"
flightres("Class Name").value="Dialog"

Set agent = description.Create()
agent("nativeclass").value="WinEdit"
agent("attachedtext").value="Agent Name:"

Set pwd = description.Create()
pwd("nativeclass").value="WinEdit"
pwd("attachedtext").value="Password"

Set button = description.Create()
button("nativeclass").value="WinButton"
button("Text").value="OK"

Dialog("flightres").WinEdit("agent").Set "test"
Dialog("flightres").WinEdit("pwd").Set "mercury"
Dialog("flightres").WinButton("button").Click

Please let me know if i made any mistake in the above script...?


Answer

Don't put object name in qoutes.

write like
Dialog(flightres).WinEdit(agent).Set "test"
Dialog(flightres).WinEdit(pwd).Set "mercury"
Dialog(flightres).WinButton("button").Click

If you put object name in qoute then qtp try to find that
object in OR.

Is This Answer Correct ?    2 Yes 0 No