Automation of Cesium models using Selenium or Puppeteer

1. A concise explanation of the problem you're experiencing.
We are writing automation tests for our application which renders cesium 3d model. The 3d models have overlaid with button and icon which we need to interact using automation tools like Selenium or Puppeteer.

2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

4. The Cesium version you're using, your operating system and browser.

I think this is something we’ve been trying to integrate into our own testing framework to better automate, so if you find a good way to do this please share it here or on Github!

Some of the UI in Cesium is just HTML elements so you should be able to interact with them through the standard DOM API. I wonder if you can also simulate the right mouse clicks to interact with the world. Setting the camera programmatically would also help I imagine. Check out the camera tutorial here:

You can also take a look at Cesium’s own tests for inspiration. The tests here ensure that the correct thing is rendered for exampled by checking for certain pixels:

https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Specs/Renderer/DrawSpec.js