cancel
Showing results for 
Search instead for 
Did you mean: 

Can we capture Page Weight (in KB) on every page load in TestComplete

SOLVED
Highlighted
Occasional Contributor

Can we capture Page Weight (in KB) on every page load in TestComplete

Can we capture Page Weight (in KB) on every page load in TestComplete, similar to BrowserMobProxy in Selenium or YSlow add on. Basically need to access the Network information to get the page weight and page load time. 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Leader

Re: Can we capture Page Weight (in KB) on every page load in TestComplete

Hi,

 

I've never done this before, but you can run JS scripts like this by running Web tests in TestComplete:

 

https://support.smartbear.com/testcomplete/docs/app-testing/web/general/common-tasks/javascript.html

 

It may be worth trying to run a script that runs on the window object. Like this one:

 

window.performance

 

More info on stack:

https://stackoverflow.com/questions/14341156/calculating-page-load-time-in-javascript

View solution in original post

2 REPLIES 2
Highlighted
Community Leader

Re: Can we capture Page Weight (in KB) on every page load in TestComplete

Hi,

 

I've never done this before, but you can run JS scripts like this by running Web tests in TestComplete:

 

https://support.smartbear.com/testcomplete/docs/app-testing/web/general/common-tasks/javascript.html

 

It may be worth trying to run a script that runs on the window object. Like this one:

 

window.performance

 

More info on stack:

https://stackoverflow.com/questions/14341156/calculating-page-load-time-in-javascript

View solution in original post

Highlighted
Community Hero

Re: Can we capture Page Weight (in KB) on every page load in TestComplete

Hi,

 

> similar to BrowserMobProxy.

Sure. Just setup your web browser to use BrowserMobProxy (or any other proxy) and you are done.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

How to execute remote test and obtain results via Test Runner REST API

Participate!

Comparing content of HTML table with Excel file data

Participate!

Compare HTML table with Excel file and correct data in the file

Participate!

Retrieve Data from a Web Page

Participate!
Top Kudoed Authors