Manager.ActiveBrowser isn't working

4 posts, 0 answers
  1. Artem
    Artem avatar
    25 posts
    Member since:
    Jul 2010

    Posted 06 Jul 2010 Link to this post

    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

     

  2. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 06 Jul 2010 Link to this post

    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
  3. Artem
    Artem avatar
    25 posts
    Member since:
    Jul 2010

    Posted 07 Jul 2010 Link to this post

    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
  4. Cody
    Admin
    Cody avatar
    3354 posts

    Posted 07 Jul 2010 Link to this post

    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
Back to Top