Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Identifying the DialogBox in firefor
#1
Solved: 10 Years, 9 Months ago
I am automating userlogin.I would record the script in IE and run the same code in FireFox.On clicking on "Login" button on leaving the user name empty the dialog "Enter username" would appear.In I.E the dialog is recognized where as in firefox the dialog is not recognized.

I have written the following code but error is getting displayed
Code:
str=Browese("").GetROproperty("application version")
If not (strcomp(str,"Internet Explaorer 6")) Then
  Browser("micClass:=Browser")Page("micClass:=page").Dialog("micClass:=Dialog").Click()
End IF
Reply
#2
Solved: 10 Years, 9 Months ago
Your answer is present in your code itself. What should str variable return in the case of firefox?
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#3
Solved: 10 Years, 9 Months ago
The str would return "firefox 1.1". on execution of the code
Code:
Browser("micClass:=Browser").Page("micClass:=Page").Dialog("micClass:=Dialog").WebButton("OK").click
The error is displayed as "WebButton" cannot be identified and check the parent class.
Let me know whether the above code is right or wrong?where i have done the mistake.

-Thanks
Reply
#4
Solved: 10 Years, 9 Months ago
Hi,

Try this & let me know .....

Code:
Browser("micClass:=Browser").Page("micClass:=Page").Dialog("micClass:=Dialog").WebButton("micclass:=WebButton","Text:=OK").click
Reply
#5
Solved: 10 Years, 9 Months ago
@Mahalaxmi: The statement won't work because you can't have the object in Object Repository as the child of objects that are defined using descriptive programming approach.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#6
Solved: 10 Years, 9 Months ago
I changed my code but still i am getting "Object doesnot support this property"

Code:
MsgBox Browser("SRAIS-AS Login").Dialog("micclass:=Dialog,regexpwndtitle:=The page at 172.16.2.131 says:").Page("The page at 172.16.2.131 says:").WebButton("micclass:=WebButton,value:=OK").Exist



I tried your option it is not working "Object doesnot support this property"


Attached Files
.doc   dialog_err.doc (Size: 446 KB / Downloads: 72)
Reply
#7
Solved: 10 Years, 9 Months ago
Hey, MahalakshmiDevi

I have same problem, with a Dialog box in Firefox, did you find any solution?

Cheers,

Zaira
Reply
#8
Solved: 10 Years, 9 Months ago
Hi Zaira,

Please get the Browser version and if the browser is firefox, use descriptive programming to click the OK button.
Code:
If str = "Firefox" Then
Browser("Browser").Dialog("text:=The page at 172.16.0.0 says:").Page("title:=The page at 172.16.0.0 says:").WebButton("name:=OK").Click
End if

Thanks,
Reply
#9
Solved: 10 Years, 9 Months ago
Thanks QTPian, but I have tried it and it does not work...when I am debugging Browser recognizes two childobjects as winobjects...instead of finding at least one dialog box.


Sad
Reply
#10
Solved: 10 Years, 9 Months ago
Hi zaira,

Can you provide your code..? So that I can know where exactly the problem is..

Thanks,
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)