Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Object Reposoitory and Dialog boxes
#1
Not Solved
Hi,

I seem to be having issues with dialog boxes and my object repository. I can select a link to open a PDF file, then select Save in the popup dialog box, then select Dave again to over write an existing file. QTP fginds and creates the following code:

Code:
Browser("Wisdom CTE").Page("Wisdom CTE_3").Frame("parent_2").Link("RIG404").Click

Dialog("File Download_3").Dialog("Save As").WinButton("Save").Click
Dialog("File Download_3").Dialog("Save As").Dialog("Save As").Activate
Dialog("File Download_3").Dialog("Save As").Dialog("Save As").Click 229,33
Dialog("File Download_3").Dialog("Save As").Dialog("Save As").WinButton("Yes").Click

If Dialog("File Download_2").Dialog("Save As").Dialog("Save As").WinButton("Yes").Exist Then
    Dialog("File Download_2").Dialog("Save As").Dialog("Save As").WinButton("Yes").Click
End If

But all of the lines with Dialog box throws errors thawt not found in OR. But my OR has everything there as required.

Does anyone know how to fix this?
Reply
#2
Not Solved
send the screen shots of your OR. make sure that OR is associated with the test script.
Reply
#3
Not Solved
Hope this will help. ;-) see screen shots


Attached Files
.doc   Object Reposoitory and Dialog boxes.doc (Size: 316.5 KB / Downloads: 119)
Reply
#4
Not Solved
Try with the following things:

1. Remove coornidates whereever you find in your script. Like i can see the following line your script:
Dialog("File Download_3").Dialog("Save As").Dialog("Save As").Click 229,33 ' insted of this you should right
Dialog("File Download_3").Dialog("Save As").Dialog("Save As").Click

2. Provide sync/wait points whenever required

3. Your OR is having redundency of objects. you can try DP like
Dialog("nativeclass:=#32770")
whenever you find dialog box you can replace that with above one.
Winbutton("text:=&Yes")
replace winbutton with the above one
that means Dialog("File Download_3").Dialog("Save As").WinButton("Yes").Click could be written:
dialog("nativeclass:=#32770").dialog("nativeclass:=#32770").Winbutton("text:=&Yes").Click
4. You can use object spy feature of QTP to know the object properties and object hierarchy level.





Reply
#5
Not Solved
Sorry Jay...

What is DP?

I am confussed on what to do with the above code in #3

In #4. did you see my attachment? Everything look like other WinButton's that I compared too.

hmmm ;-) This is very weird case.

L

L
Reply
#6
Not Solved
DP means descriptive programming in which we assign object properties in script or in code line instead of using object repository.

You can use "dialog("nativeclass:=#32770").dialog("nativeclass:=#32770").Winbutton("text:=&Yes").Click" line for clicking Yes button even if there is no object present in the object repository.


Reply
#7
Not Solved
Jay,

Ok, After looking at the OR of the button and dialog box, I see how this works. Thx!

Where can I read up on Descriptive Programming? thx

Still, this also did not sellect the Save bhutton. Please see my attachment.

Argh ;-)


Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Dialog boxes in Firefox 13+ skywalker89 1 3,690 08-28-2012, 09:48 AM
Last Post: souvikghosh_diatm
  Need a function or Suggession on UnExpected Dialog Boxes swaruptkumar 0 1,975 02-09-2010, 09:10 PM
Last Post: swaruptkumar
  IE Dialog Box, Print XeNoMoRpH 2 4,396 06-30-2009, 05:50 PM
Last Post: XeNoMoRpH
  Selecting Check boxes by Descriptive Programming sunny rao 3 10,763 01-08-2009, 07:12 PM
Last Post: sunny rao

Forum Jump:


Users browsing this thread: 1 Guest(s)