# Can somebody tell me how to test my 3D model in puppeteer to see how well it works?

**URL:** <https://discourse.threejs.org/t/can-somebody-tell-me-how-to-test-my-3d-model-in-puppeteer-to-see-how-well-it-works/53517>\
**Category:** Questions\
**Tags:** glb, glb-model, webgl\
**Created:** [July 5, 2023, 3:34am UTC](https://discourse.threejs.org/t/can-somebody-tell-me-how-to-test-my-3d-model-in-puppeteer-to-see-how-well-it-works/53517 "2023-07-05T03:34:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jayy.96](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/jayy.96/32/40144_2.png) [@jayy.96](https://discourse.threejs.org/u/jayy.96)\
**Post date:** [July 5, 2023, 3:34am UTC](https://discourse.threejs.org/t/can-somebody-tell-me-how-to-test-my-3d-model-in-puppeteer-to-see-how-well-it-works/53517/1 "2023-07-05T03:34:13Z")

</div>

Actually, I require a test case in order to execute an automated puppeteer test. So, if anyone has a script or resource for it, please send it to me here.

---

<div class="post-metadata">

**Author:** ![JacksonUptain](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/jacksonuptain/32/37483_2.png) [@JacksonUptain](https://discourse.threejs.org/u/JacksonUptain)\
**Post date:** [July 5, 2023, 3:55pm UTC](https://discourse.threejs.org/t/can-somebody-tell-me-how-to-test-my-3d-model-in-puppeteer-to-see-how-well-it-works/53517/2 "2023-07-05T15:55:30Z")

</div>

Sorry bro…I can’t think of how to do that…any videos maybe?

---

<div class="post-metadata">

**Author:** ![makc3d](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/makc3d/32/10452_2.png) [@makc3d](https://discourse.threejs.org/u/makc3d)\
**Post date:** [July 5, 2023, 7:40pm UTC](https://discourse.threejs.org/t/can-somebody-tell-me-how-to-test-my-3d-model-in-puppeteer-to-see-how-well-it-works/53517/3 "2023-07-05T19:40:19Z")

</div>

- save a canvas as an image
- set headless to false

---

<div class="post-metadata">

**Author:** ![jayy.96](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/jayy.96/32/40144_2.png) [@jayy.96](https://discourse.threejs.org/u/jayy.96)\
**Post date:** [July 6, 2023, 5:33am UTC](https://discourse.threejs.org/t/can-somebody-tell-me-how-to-test-my-3d-model-in-puppeteer-to-see-how-well-it-works/53517/4 "2023-07-06T05:33:01Z")

</div>

I didn’t find any videos related to it. If you can so please share here.

---

<div class="post-metadata">

**Author:** ![jayy.96](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/jayy.96/32/40144_2.png) [@jayy.96](https://discourse.threejs.org/u/jayy.96)\
**Post date:** [July 6, 2023, 5:33am UTC](https://discourse.threejs.org/t/can-somebody-tell-me-how-to-test-my-3d-model-in-puppeteer-to-see-how-well-it-works/53517/5 "2023-07-06T05:33:43Z")

</div>

can you send me any repository or script 0r method or video related to it ?

---

<div class="post-metadata">

**Author:** ![makc3d](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/makc3d/32/10452_2.png) [@makc3d](https://discourse.threejs.org/u/makc3d)\
**Post date:** [July 6, 2023, 9:02am UTC](https://discourse.threejs.org/t/can-somebody-tell-me-how-to-test-my-3d-model-in-puppeteer-to-see-how-well-it-works/53517/6 "2023-07-06T09:02:13Z")

</div>

> [@jayy.96](#):
>
> script 0r method or video related to it ?

sure, on puppeteer side you use [toDataURL](https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/toDataURL) and then back in node you

```js
// save a canvas as an image
var base64Data = dataURL.replace(/^data:image\/png;base64,/, "");
require("fs").writeFile("out.png", base64Data, 'base64', function(err) {
  console.log(err);
});

```

or

```js
  const browser = await puppeteer.launch({
    headless: false // specify this to see how your page looks like in puppeteer
  });

```
