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

WaitforPageload - not waiting till application is getting loaded

3 Answers 76 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Nagaraj
Top achievements
Rank 1
Nagaraj asked on 29 Mar 2013, 05:38 AM
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

3 Answers, 1 is accepted

Sort by
0
Boyan Boev
Telerik team
answered on 02 Apr 2013, 01:22 PM
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
0
Nagaraj
Top achievements
Rank 1
answered on 03 Apr 2013, 09:58 AM
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.
0
Accepted
Boyan Boev
Telerik team
answered on 04 Apr 2013, 08:42 AM
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
Tags
General Discussions
Asked by
Nagaraj
Top achievements
Rank 1
Answers by
Boyan Boev
Telerik team
Nagaraj
Top achievements
Rank 1
Share this question
or