This is a migrated thread and some comments may be shown as answers.

Manager.ActiveBrowser isn't working

3 Answers 286 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Artem
Top achievements
Rank 1
Artem asked on 06 Jul 2010, 12:13 PM

Hi,

We're migrating from WebAii 1.1 to WebAii 2.0 and found some problems.
One of them it's a problem with Manager.ActiveBrowser Property.

When I'm using on of these methods:
            Manager.ActiveBrowser.WaitUntilReady();
            Manager.ActiveBrowser.RefreshDomTree();

I'm receiving an error:
System.NullReferenceException: Object reference not set to an instance of an object.
at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)
ArtOfTest.WebAii.Exceptions.ExecuteCommandException: ExecuteCommand failed!
BrowserCommand (Type:'Information',Info:'IsReady',Action:'NotSet',Target:'null',Data:'',ClientId:'Client_e525dafc-eedf-434b-867a-ce3dadb58785',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'False',Response:'')
InnerException: System.NullReferenceException: Object reference not set to an instance of an object.
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)
at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)
at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request, Boolean performDomRefresh, Boolean waitUntilReady)
at ArtOfTest.WebAii.Core.Browser.IsReady()
at ArtOfTest.WebAii.Core.Browser.WaitUntilReady()

But when I'm using Manager.Browsers[0]  everything is ok, But unfortunately this workaround require us to do huge amount of work, because we have already created a lot of tests (3000+) which now work using WebAii 1.1

 

 Could you assist us with this issue?

Best regards,
Artem Nenashev

 

3 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 06 Jul 2010, 09:18 PM
Hello Artem,

This problem sounds very strange and interesting. We took great care that problems like this would not happen when you upgrade the framework. Yes I'd like to study this problem. Can you send me one sample test where you see this problem? Please tell me which line number in your code throws the exception when you run it under 2.0.

Kind regards,
Cody
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Artem
Top achievements
Rank 1
answered on 07 Jul 2010, 04:20 PM
Hi Cody,

Unfortunately we have strong confidential policy so we can't give you access to our application. And on other sites I can't reproduce this issue.
But I think I know where the problem is. In our application we have one dummy pop-up window(to check if pop-up blocker is enabled), which opens right after login to application. So I think that the problem is that Manager.ActiveBrowser sets to this window and after this window is closed. Manager.ActiveBrowser becomes Null.
With WebAii 1.1 Manager.ActiveBrowser was equal to latest opened and not closed browser but now with WebAii 2.0. as I see, Manager.ActiveBrowser is latest opened browser without checking whether it is open or not.

Best regards,
Artem Nenashev
0
Cody
Telerik team
answered on 07 Jul 2010, 04:39 PM
Hello Artem,

Thank you for the update! That is very good work tracking down where the problem is. Let me know if you need further assistance.

Best wishes,
Cody
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Artem
Top achievements
Rank 1
Answers by
Cody
Telerik team
Artem
Top achievements
Rank 1
Share this question
or