I am new to interfaces. What I am trying to do is defined a browser in a interface and then trying to access it from tests.
defined following in a sb.vb file
Public Function Setup(ByVal Host As String, _
ByVal Port As Integer, _
ByVal String As String, _
ByVal URL As String) Implements IBrowser.Setup
Return New DefaultSelenium(Host, Port, String, URL)
End Function
and then calling it in a testmethod
TBrowser.Setup("localhost", 4444, "*firefox", "test")
TBrowser.Start()
Giving me the following error
Test method UnitTest1.test threw exception:
System.NullReferenceException: Object reference not set to an instance of an object.
Any idea what I am doing wrong
You need to assign the Instance of Selenium returned by your ‘Setup’ function to an ISelenium variable. Then use that variable to start Selenium server.
Hope this helps.
Thanks,
Vamyip