How to get popup error message.



How to get popup error message...

Answer / Sudhir Singh Kashyap

In QTP (QuickTest Professional), you can use the 'BrowserWindow.Alert' method to handle popup errors. Here is a simple example:

```vbnet
Browser('browserName').Page('pageName').Dialog('dialogName').Button('OK').Click
Browser('browserName').Page('pageName').Alert = |Error Message|
Browser('browserName').Page('pageName').Dialog('dialogName').Button('OK').Click
```
Replace 'browserName', 'pageName', 'dialogName' and 'OK' with the appropriate values for your test case.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

How to customize qtp?

1 Answers  


can anyone tell me what to say in interview when interviewer asks about "tell me about your framework in your project"?

0 Answers  


What are SetToProperty, SetRoProperty, GetToProperty scripting?

4 Answers  


anyone can explain the following concepts. 1.diff b/w Linear and modular framework 2.diff b/w keyword and hybrid framework

1 Answers  


How can I open a EXCEL file from QTP Resultviewer with reporter.ReportEvent function call. Example: Test files for details click "here". And clicking "Here" in the resultviewer will open a local EXCEL FILE.

1 Answers   ING,


wht is the difference between action and functio?

3 Answers  


Write a code check the checkbox in the web table which is in the 4th row and fifth column (Use child item concept)

2 Answers   FIS, Wipro,


Hi Friends this is kumar i would like to request to all of you ,please help me to explain real time project with using qtp scripts i know basics of qtp but it won't workout on interviews,pls help awating to reply.

1 Answers   SoftTech,


What are the Test design techniques you uses in ur project?

0 Answers   Accenture,


Hi,The question is write a script for the following scenario. scenario:in a job portal i entered QTP 3yrs testing then click search button.then it displays results like Test lead bangalore (here is a checkbox). Test lead hyderabad check box so on... question is if test lead position in bangalore then checkbox shld be enabled automatically..

4 Answers   Thatavarti Technologies,


How we test the logo or images in the web page using QTP? For example take google page, they change their logo for new year,christmas etc..How we test that? Plz answer this question... Thanks in advance..

2 Answers  


What is the extension of qtp local repository?

1 Answers  


Categories