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

Evaluation - Bitmap of custom HTML

4 Answers 53 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Sean
Top achievements
Rank 1
Sean asked on 30 May 2014, 01:25 PM
Hi, I'm evaluating the Testing Framework, and am looking for a specific feature I'm hoping can be supported.
I think I see that to grab a bitmap of the page, I would use Browser.Window.GetBitmap(), which is awesome.
However, I would like to do the same thing, but from a page that is rendered with HTML source that is provided, not navigated to.  For example, I take some existing HTML source, do some manipulation, give it to the Browser to render somehow, then grab Bitmap.  Hopefully in some straightforward manner leveraging the Testing Framework.

Will Testing Framework allow me to do this?  Or is there a better way?

Thanks!

4 Answers, 1 is accepted

Sort by
0
Sean
Top achievements
Rank 1
answered on 30 May 2014, 01:35 PM
Also, I'm hoping GetBitmap works when run in a service?
0
Boyan Boev
Telerik team
answered on 04 Jun 2014, 11:23 AM
Hello Sean,

Thank you for contacting us.

Our framework works with the active browser, which means the browser which the recorder is connected to.

You have several options:

1. You can change the page you are navigating.

2. You can navigate to some local host page which is changed.

3. You can manually attach to a browser which has open the manipulated page. Please see this article.

If I am missing something, please give us more detailed information.

Regards,
Boyan Boev
Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
0
Sean
Top achievements
Rank 1
answered on 06 Jun 2014, 07:28 PM
Boyen,

Let's see if I understand option 1) correctly:

1) Open the browser to some physical local page, call it empty.aspx
2) Replace the contents of the page using Testing Framework (this would be a complete replacement)
3) Allow the browser to render the new content
4) Grab the bitmap

If that is indeed what you meant, I wasn't sure that there were methods that would allow step 2)
0
Boyan Boev
Telerik team
answered on 11 Jun 2014, 07:31 AM
Hi Sean,

You are right, you cannot change the source of the page via Testing Framework.

You should change the HTML source in some other way.

If you need further assistance please let us know.

Regards,
Boyan Boev
Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
Tags
General Discussions
Asked by
Sean
Top achievements
Rank 1
Answers by
Sean
Top achievements
Rank 1
Boyan Boev
Telerik team
Share this question
or