New Ranks & Badges For The Community!
Notice something different? The ranks and associated badges have gone "Star Fleet". See what they all mean HERE
Highlighted
Absent Member.
Absent Member.
180 views

how to capture the diaglox box in qtp

Jump to solution
Hi,
I clicked "add object" in qtp and captured a dialog box and its objects. then qtp captured a browser, a dialog box and two win buttons ok and cancel. now when i run the script, qtp is not able to recognise the objects. why? In my application page, as i press save, it gives this dialog box asking if I want to save the changes or cancel.

In my script i gave:
Browser("CY64 FC Invoices").Page("CY64 FC").Browser("browser").dialog("Microsoft Internet Explorer").WinButton("OK").Click

I also tried deleting the new browser and moved all of its contents to the existing browser in my Object repository and gave the script as
Browser("CY64 FC Invoices").Page("CY64 FC").dialog("Microsoft Internet Explorer").WinButton("OK").Click

Even then it didnot work. Please suggest.

thank you.

0 Likes
1 Solution

Accepted Solutions
Highlighted
Absent Member.
Absent Member.
Record all the steps again. Once the recording is done, add one step before clicking OK button.

Dialog("Microsoft Internet Explorer").Activate

If not working please provide the sample code.

Thanks..Arpan

View solution in original post

0 Likes
4 Replies
Highlighted
Absent Member.
Absent Member.
As an idea, just try recording on the Dialog box to close it. This will help you to know the hierachy of the OK and Close buttons in the dialog box and you can code accordingly.
0 Likes
Highlighted
Absent Member.
Absent Member.
Record all the steps again. Once the recording is done, add one step before clicking OK button.

Dialog("Microsoft Internet Explorer").Activate

If not working please provide the sample code.

Thanks..Arpan

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.
This is what i wanted:
Dialog("Microsoft Internet explorer").Activate

Using that i played with my code and it worked. Thanks Arpan
0 Likes
Highlighted
Absent Member.
Absent Member.
I found the answer as i said above 🙂
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.