WaitforPageload - not waiting till application is getting loaded

4 posts, 1 answers
  1. Nagaraj
    Nagaraj avatar
    4 posts
    Member since:
    Mar 2013

    Posted 29 Mar 2013 Link to this post

    I am automating an silverlight application using Telerik framework. This application uses telerik controls. Below is the issue i am facing

    1. Navigated to the url
    2. Logged in to the application
    3. Once clicked on login, the my code is not waiting till the browser is completly loaded and it starts executing the next steps.
    4  I used method "element.WaitForExists()" but still it is not working.
    5. I also tried with "WaitForPageLoad()" That is also not helping me

    Below mentioned the code which i used

    ActiveBrowser.WaitUntilReady();
    ActiveBrowser.WaitForPageLoad();

    Thanks in advance,
    Nagaraj R.
    09663820925
  2. Boyan Boev
    Admin
    Boyan Boev avatar
    1039 posts

    Posted 02 Apr 2013 Link to this post

    Hello Nagaraj,

    I am sorry you are running into this problem.

    First thing you can try is to increase the global wait on elements timeout that will be used during the execution:

    Settings mySettings = new Settings();
    mySettings.ElementWaitTimeout = 100000;

    Another option is to add an "element.WaitForExists()" step for one of the last elements in the DOM tree or for an element which is loading slowly. 

    Note that you should set the timeout in the brackets (e.g. elelment.WaitForExists(100000);).

    Hope this helps.

    All the best,
    Boyan Boev
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
  3. DevCraft banner
  4. Nagaraj
    Nagaraj avatar
    4 posts
    Member since:
    Mar 2013

    Posted 03 Apr 2013 Link to this post

    Hello Boyan,

    Thanks for your reply. I have resolved this issue by using the progress bar properties. 

    I am facing another issue. It will be really helpful if you can guide me in this.

    I am using the below code :

    SilverlightApp BrowserApplication = null;
      ActiveBrowser.NavigateTo(Url);
                ActiveBrowser.WaitForUrl(Url, false, 60000);
                BrowserApplication = ActiveBrowser.SilverlightApps()[0];

    In the last line, the the default wait time for silverlight application to load is 30000 msec and it cant be modified. So if the url is not loaded within that time i am getting exception. Let me know how this can be handled.

    Thanks,
    Nagaraj R.
  5. Answer
    Boyan Boev
    Admin
    Boyan Boev avatar
    1039 posts

    Posted 04 Apr 2013 Link to this post

    Hi Nagaraj,

    To increase the Silverlight Connect Timeout by using the following line:

    Manager.Settings.Web.SilverlightConnectTimeout = 60000;

    Hope this helps.
     

    Regards,
    Boyan Boev
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
Back to Top