Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QTP not able to identify my Browser, has anybody experienced this issue?
#1
Solved: 11 Years, 4 Months ago Question 
Hi All,
when I am running the test I am getting the following error:
Quote:Cannot identify the object "[ Browser ]" (of class Browser). Verify that this object's properties match an object currently displayed in your application.
Can anybody let me know how can I resolve this problem.

I am using it's calls in next way:
Code:
Dim URL: URL = "http://theURL.com"

Set obj_WebBrowser = Description.Create  
    obj_WebBrowser ("micclass").value = "Browser"
    obj_WebBrowser ("name").value = "Microsoft Internet Explorer"
    obj_WebBrowser ("application version").value="internet explorer 6"
    obj_WebBrowser ("LocationURL").value = URL & ".*"
    obj_WebBrowser ("openurl").value= URL & ".*"

Set obj_WebPage = Description.Create  
    obj_WebPage ("micclass").value = "Page"

Set EnvironmentURL = Browser(obj_WebBrowser).Page(obj_WebPage)

And it is called in a class' function like this:
Code:
Public Function TextBox
    Set TextBox = New QTPTextBox
End Function

Class QTPTextBox

'texfield  identified by name
    Public Function SetTextByName (elementName, elementValue)
        Set obj_WebEdit = Description.Create  
        obj_WebEdit ("micclass").value = "WebEdit"
        obj_WebEdit ("name").value= elementName

        With Browser(obj_WebBrowser).Page(obj_WebPage)
'also there can be used like this: "With EnvironmentURL.... End With"
          .Sync
          .WebEdit(obj_WebEdit).Set elementValue
        End with
    End Function
End Class

And now the class is called like this:
Code:
With TextBox
    '  set username
    .SetTextByName "j_username", User
    '  set password
    .SetTextSecure "j_password", Password
End With
Reply
#2
Solved: 11 Years, 4 Months ago
I think the name is causing the issue here
obj_WebBrowser ("name").value = "Microsoft Internet Explorer"

keep it as ".* Microsoft Internet Explorer", should solve your issue.

I always noticed that if you put anything like 'Urgent', 'ASAP' etc, you will never get a reply Smile. That means, it seems members here does not like these words . read posting guidelines.

Reply
#3
Solved: 11 Years, 4 Months ago
Hello Saket,
thanks a lot, but I tried a lot of type of descriptions for objects, for e.g. I used next:

Code:
Set obj_WebBrowser = Description.Create  
    obj_WebBrowser ("micclass").value = "Browser"
    obj_WebBrowser ("LocationURL").value = URL & ".*"
    obj_WebBrowser ("openurl").value= URL & ".*"
but it's still doesn't work.. when I found this issue by now passed 4 days, and I've read a lot of forums and there is no answer..
Also in some tests this issue doesn't appears, but in ~90% of tests it's appears..

about the:
Quote:I always noticed that if you put anything like 'Urgent', 'ASAP' etc, you will never get a reply Smile. That means, it seems members here does not like these words . read posting guidelines.
also Thanks!
Reply
#4
Solved: 11 Years, 4 Months ago
try to add "Creationtime" description as well, see if that helps

Reply
#5
Solved: 11 Years, 4 Months ago
Also u could go with "HWND property" it would useful try with this

Venkat.Batchu
Reply
#6
Solved: 11 Years, 4 Months ago
I see you have special characters in your openurl.Try replacing those with character codes/regular expression.
Reply
#7
Solved: 11 Years, 4 Months ago
Hi,
Don't go for so much properties to create a description, u can use

Dim URL: URL = "http://wasce.wasce.st/RBSIFCSM/"

Code:
Set obj_WebBrowser = Description.Create

Code:
obj_WebBrowser ("micclass").value = "Browser"
' Use the regular expression as the name displayed on your page what I 'had used is an exapmle.
    obj_WebBrowser ("name").value = "Microsoft Internet Explorer.*"


Code:
Set obj_WebPage = Description.Create  
    obj_WebPage ("micclass").value = "Page"

Set EnvironmentURL = Browser(obj_WebBrowser).Page(obj_WebPage)


Regards,
Sankalp
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Issue in running Scripts on Edge browser Deepa_m 0 1,643 12-01-2017, 04:36 PM
Last Post: Deepa_m
  error object disabled on line 9 where it says " Browser("Browser").CloseAllTabs" kp_usa 1 3,363 12-20-2012, 12:20 AM
Last Post: adityapant27
  My IE Browser Recognizing as Window instead of Browser. sivakrishna 4 9,109 02-11-2012, 12:19 AM
Last Post: ravi.gajul
  Clicking an item in the context menu opens up browser(IE6) but in same browser of QC pjavvaru 2 4,413 04-10-2010, 02:16 AM
Last Post: jsknight1969
  Browser Issue abhishek.hegde 2 2,792 01-19-2010, 05:46 PM
Last Post: abhishek.hegde

Forum Jump:


Users browsing this thread: 1 Guest(s)