i am entering wrong data or wrong password in a text box and
click on submit button .i am getting a popup window with a
message Please enter the correct password or data .How can i
handle this situation by using QTP.

Answer Posted / bfakruddin

Hello Folks,

Dimple provided nice answer... validation should be done on
password field... when we provide wrong input... popup gets
rise then check it is poped up or not... if it is rised
then pass the test case else... password field accepts
wrong password too...

Code is here,

res=dialog("correct password").getroproperty("enabled")

if (res=true) Then

reporter.reporteven micpass,"password validation done"
...
...

Then

dialog("correct password").webbutton("OK").click

Thanks & regards
Baba Fakruddin.D

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do I generate Test Results window using descriptive method ( run time ) after my test execution process? Please have a look of my below code. ========================================================= Dim qtApp Dim qtTest Dim qtResultsOpt Set qtApp = CreateObject("QuickTest.Application") qtApp.Launch qtApp.Visible = True qtApp.Options.Run.CaptureForTestResults = "Always" qtApp.Options.Run.RunMode = "Fast" qtApp.Options.Run.ViewResults = True qtApp.Open "C:\Automation\Example", True Set qtTest = qtApp.Test qtTest.Settings.Run.OnError = "NextStep" Set qtResultsOpt = CreateObject ("QuickTest.RunResultsOptions") qtResultsOpt.ResultsLocation = "C:\Automation\Example\Res1" qtTest.Run qtResultsOpt MsgBox qtTest.LastRunResults.Status qtTest.Close Set qtResultsOpt = Nothing Set qtTest = Nothing Set qtApp = Nothing ========================================================== This code is working fine, but Test Result window is not displaying after execution. Anybody can please help me regading the same. Thanks Akshaya Madali Capgemini India Pvt Ltd 9823213538

3950


After executing the script in qtp suppose i found some script execute successfully and found some error.So how to report the status for both (i.e pass and fail report)in test director. For "fail" We use "defect tab" in testdirector. But for "pass" how to report it to TL.what is the process plz anybody ans

1887


how to download mercury qtp9.2 ny internet ?

3177


How reliable are the site's Internet connections required to be? And how does that affect backup system or redundant connection requirements and testing?

902


Give me some real time point of way where exactly we can conduct audits?

1667






How you calling actions in qtp?

812


How to attach a file to TD?

846


There is an built in window application in qtp9.1,i.e.Flight4.0.i want to implement the recovery maneger on it.How can i do this?

1798


How to define array in qtp?

748


Suppose you are using shared objects repository in your test and you want to split your present action? At that time shared object repository is single or it’s also splits?

866


What is difference between design time and run time data table?

777


i am new QTP... please tell me automation frameworks , types & for whiich type of applications frameworks are used & how to generate script in keyword driven framework

1811


Hi All, How to Compare two strings character by character in QTP

1218


What are the views available in qtp?

787


how u will evaluate the tool for test automation?

1572