Micro Focus QTP (UFT) Forums
Identifying the DialogBox in firefor - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Identifying the DialogBox in firefor (/Thread-Identifying-the-DialogBox-in-firefor)

Pages: 1 2


Identifying the DialogBox in firefor - MahalakshmiDevi - 04-29-2009

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



RE: Identifying the DialogBox in firefor - Ankur - 04-29-2009

Your answer is present in your code itself. What should str variable return in the case of firefox?


RE: Identifying the DialogBox in firefor - MahalakshmiDevi - 04-29-2009

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


RE: Identifying the DialogBox in firefor - sreekanth chilam - 04-29-2009

Hi,

Try this & let me know .....

Code:
Browser("micClass:=Browser").Page("micClass:=Page").Dialog("micClass:=Dialog").WebButton("micclass:=WebButton","Text:=OK").click



RE: Identifying the DialogBox in firefor - Ankur - 04-29-2009

@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.


RE: Identifying the DialogBox in firefor - MahalakshmiDevi - 04-30-2009

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"


RE: Identifying the DialogBox in firefor - zaira_p - 07-24-2009

Hey, MahalakshmiDevi

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

Cheers,

Zaira


RE: Identifying the DialogBox in firefor - QTPian - 07-24-2009

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,


RE: Identifying the DialogBox in firefor - zaira_p - 07-24-2009

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


RE: Identifying the DialogBox in firefor - QTPian - 07-27-2009

Hi zaira,

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

Thanks,