Automating Canvas Applications Using Selenium

6,299 views
6,068 views

Published on

Published in: Technology, Business
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
6,299
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
31
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Automating Canvas Applications Using Selenium

  1. 1. Automating CanvasApplications Using Selenium Dave Hunt: @davehunt82 Andy Smith: @andismith
  2. 2. What is Canvas?
  3. 3. The Wilderness Downtown http://www.thewildernessdowntown.com/
  4. 4. Pirates Love Daisies http://www.pirateslovedaisies.com/
  5. 5. 20 Things I Learned http://www.20thingsilearned.com
  6. 6. <CANVAS>
  7. 7. DEMOHuman playing Helicopter
  8. 8. Inside Information function gameData() { return { altitude: 20, caveCeiling: [90, 80, 85], caveFloor: [10, 5, 10] } }
  9. 9. Flight School• Disabled obstacles• Compensate momentum• Field of vision• Minimise requests
  10. 10. DEMOSelenium playing Helicopter without obstacles
  11. 11. Visual Feedback• Reintroduced obstacles• Created a ‘Heads up display’• Fine-tuned field of vision
  12. 12. DEMOSelenium playing Helicopter with HUD
  13. 13. Crash Testingdef testShouldCrashIntoCeiling(self): base_page = BasePage(self.driver) base_page.start_game() base_page.engage_thrusters() base_page.wait_until_crash() self.assertEquals(base_page.helicopter_altitude, 90)def testShouldCrashIntoFloor(self): base_page = BasePage(self.driver) base_page.start_game() base_page.wait_until_crash() self.assertEquals(base_page.helicopter_altitude, 14)
  14. 14. How can we do this?• Work together• Establish testing requirements• Write automation hooks• Consider visual feedback• Create tests!
  15. 15. http://bit.ly/selenicopter @davehunt82 dhunt@mozilla.com@andismith andi.smith.uk@gmail.com

×