The Lonely T-Rex Chrome Dino Game
The Chrome Dino game was developed by Google back in 2014 and built into the Chrome browser. Whenever the user attempts to navigate any webpage on Google Chrome while offline, the browser indicates that they are not connected to the internet and displays the pixelated Tyrannosaurus rex game. The game is very simple! Users should avoid obstacles that come in T-Rex’s path by using space or arrow keys.
Automating the Game
- Create a new instance for the T-Rex Runner
- Identify if there is an obstacle in the T-Rex runner’s horizon
- If an obstacle is found, identify whether it's a CACTUS or PTERODACTYL
- Identify the location (X, Y) of the obstacle (required for Pterodactyls)
- Based on obstacle type and Y pos, add a condition to Jump or Duck
- Finally, call the function so that it runs on the browser while the game is played
If you found this interesting, you can find more such articles here on quality assurance, test automation, tools, and processes. Don’t forget to leave your comments here or on Twitter @testingchief. Thank you!