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: 10 Years, 9 Months, 1 Week 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


Messages In This Thread
QTP not able to identify my Browser, has anybody experienced this issue? - by lotos - 08-05-2010, 02:57 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Issue in running Scripts on Edge browser Deepa_m 0 1,542 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,118 12-20-2012, 12:20 AM
Last Post: adityapant27
  My IE Browser Recognizing as Window instead of Browser. sivakrishna 4 8,694 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,245 04-10-2010, 02:16 AM
Last Post: jsknight1969
  Browser Issue abhishek.hegde 2 2,674 01-19-2010, 05:46 PM
Last Post: abhishek.hegde

Forum Jump:


Users browsing this thread: 1 Guest(s)