System.InvalidOperationException: Sequence contains no elements

2 posts, 0 answers
  1. Aruna
    Aruna avatar
    1 posts
    Member since:
    Sep 2011

    Posted 09 Nov 2011 Link to this post

    trying something of this form

    Manager.LaunchNewBrowser(

     

    BrowserType.FireFox,false);

     

    ActiveBrowser.NavigateTo(

     

    "http://www.google.com");

     


    Am I missing anything

    throws exception:
    System.InvalidOperationException: Sequence contains no elements
       at System.Linq.Enumerable.Last[TSource](IEnumerable`1 source)
       at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect, ProcessWindowStyle windowStyle, String arguments)
       at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect, ProcessWindowStyle windowStyle)
       at ArtOfTest.WebAii.Core.Manager.LaunchNewBrowser(BrowserType browserToLaunch, Boolean waitForBrowserToConnect)
       at WebTests.NavTest1.TestMethod1() in D:\NAVSrc\Main\CMA.VM\WebTests\NavTest1.cs:line 96
  2. Plamen
    Admin
    Plamen avatar
    8 posts

    Posted 10 Nov 2011 Link to this post

    Hi Aruna,

    You are getting this error because of this line:
    Manager.LaunchNewBrowser(BrowserType.FireFox, false);
    When the second argument of the LaunchNewBrowser() method is set to "false" the framework will not wait for the new browser to connect. In order to make this to work, you need to change it to "true" or to delete the bool argument completely.

    If you haven't done so already, please check out our online documentation here. If you have any further questions, please don't hesitate to ask! 

    Regards,
    Plamen
    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